explain.depesz.com

A tool for finding a real cause for slow queries.

Result: g3F

options
Did it help? Consider supporting us - Bitcoin address: 12v2hUztAk2LgzQ9H9LMwuU32urHMjZQnq
# exclusive inclusive rows x rows loops node
1. 2.921 25,572.078 ↑ 1,385.3 7 1

HashAggregate (cost=2,506,583.15..2,506,680.12 rows=9,697 width=112) (actual time=25,572.034..25,572.078 rows=7 loops=1)

2. 35.727 25,569.157 ↑ 5.2 2,016 1

Hash Join (cost=787,303.52..2,506,347.26 rows=10,484 width=112) (actual time=25,157.597..25,569.157 rows=2,016 loops=1)

  • Hash Cond: ((f.banner_id = z.banner_id) AND (upper((a.acct_desc)::text) = upper((y.term_desc)::text)))
3. 336.861 25,468.449 ↑ 10.6 19,800 1

Hash Join (cost=666,158.76..2,373,564.77 rows=209,689 width=100) (actual time=25,092.575..25,468.449 rows=19,800 loops=1)

  • Hash Cond: ((d.cookie_id)::bpchar = f.id)
  • Join Filter: ((a.date > f.create_time) AND (((a.date)::timestamp without time zone - '60 days'::interval) < f.create_time))
4. 31.804 1,114.193 ↑ 1.5 29,955 1

Hash Join (cost=39,647.40..52,177.72 rows=44,599 width=133) (actual time=1,070.149..1,114.193 rows=29,955 loops=1)

  • Hash Cond: ((a.adic)::text = (d.adic)::text)
5. 4.915 227.845 ↓ 1.9 4,866 1

Nested Loop (cost=10,240.84..17,549.86 rows=2,535 width=133) (actual time=215.323..227.845 rows=4,866 loops=1)

6. 0.060 0.060 ↑ 1.0 1 1

Seq Scan on sgmt_clients b (cost=0.00..1.78 rows=1 width=38) (actual time=0.030..0.060 rows=1 loops=1)

  • Filter: (lower((userid)::text) = 'mchcu'::text)
7. 8.167 222.870 ↓ 1.9 4,866 1

Bitmap Heap Scan on attribution_summary2 a (cost=10,240.84..17,522.73 rows=2,535 width=105) (actual time=215.283..222.870 rows=4,866 loops=1)

  • Recheck Cond: ((a.date >= '2012-01-01'::date) AND (a.date <= '2012-01-31'::date) AND ((a.userid)::text = 'mchcu'::text))
8. 31.170 214.703 ↓ 0.0 0 1

BitmapAnd (cost=10,240.84..10,240.84 rows=2,535 width=0) (actual time=214.703..214.703 rows=0 loops=1)

9. 51.836 51.836 ↓ 1.1 179,635 1

Bitmap Index Scan on attsumm_date2 (cost=0.00..2,911.00 rows=159,434 width=0) (actual time=51.836..51.836 rows=179,635 loops=1)

  • Index Cond: ((a.date >= '2012-01-01'::date) AND (a.date <= '2012-01-31'::date))
10. 131.697 131.697 ↓ 1.1 510,302 1

Bitmap Index Scan on attsumm_userid2 (cost=0.00..7,328.32 rows=465,155 width=0) (actual time=131.697..131.697 rows=510,302 loops=1)

  • Index Cond: ((a.userid)::text = 'mchcu'::text)
11. 464.919 854.544 ↑ 1.0 820,647 1

Hash (cost=19,148.47..19,148.47 rows=820,647 width=74) (actual time=854.544..854.544 rows=820,647 loops=1)

  • Buckets: 131072 Batches: 1 Memory Usage: 84950kB
12. 389.625 389.625 ↑ 1.0 820,647 1

Seq Scan on sgmt_adic d (cost=0.00..19,148.47 rows=820,647 width=74) (actual time=0.014..389.625 rows=820,647 loops=1)

13. 13,564.598 24,017.395 ↑ 1.0 17,484,016 1

Hash (cost=407,961.16..407,961.16 rows=17,484,016 width=49) (actual time=24,017.395..24,017.395 rows=17,484,016 loops=1)

  • Buckets: 2097152 Batches: 1 Memory Usage: 1502533kB
14. 10,452.797 10,452.797 ↑ 1.0 17,484,016 1

Seq Scan on sgmt_user_tracker f (cost=0.00..407,961.16 rows=17,484,016 width=49) (actual time=0.021..10,452.797 rows=17,484,016 loops=1)

15. 18.264 64.981 ↑ 2.0 9,983 1

Hash (cost=120,852.41..120,852.41 rows=19,490 width=42) (actual time=64.981..64.981 rows=9,983 loops=1)

  • Buckets: 2048 Batches: 1 Memory Usage: 730kB
16. 10.815 46.717 ↑ 2.0 9,983 1

Nested Loop (cost=32.15..120,852.41 rows=19,490 width=42) (actual time=0.057..46.717 rows=9,983 loops=1)

17. 0.820 0.820 ↑ 1.0 1,949 1

Seq Scan on attr_lookup z (cost=0.00..108.49 rows=1,949 width=61) (actual time=0.008..0.820 rows=1,949 loops=1)

18. 13.643 35.082 ↑ 2.0 5 1,949

Bitmap Heap Scan on wandterms y (cost=32.15..61.73 rows=10 width=26) (actual time=0.012..0.018 rows=5 loops=1,949)

  • Recheck Cond: (y.term_code = ANY (z.target_kli))
19. 21.439 21.439 ↑ 2.0 5 1,949

Bitmap Index Scan on idx_wandterms_term_code (cost=0.00..32.15 rows=10 width=0) (actual time=0.011..0.011 rows=5 loops=1,949)

  • Index Cond: (y.term_code = ANY (z.target_kli))