explain.depesz.com

PostgreSQL's explain analyze made readable

Result: wnFH

Settings
# exclusive inclusive rows x rows loops node
1. 9.920 150.061 ↓ 1.6 23,340 1

Hash Left Join (cost=4,364.98..4,952.69 rows=14,354 width=188) (actual time=60.188..150.061 rows=23,340 loops=1)

  • Hash Cond: (crea.id = conv.creative_id)
2. 10.234 119.874 ↓ 1.6 23,340 1

Hash Left Join (cost=3,211.41..3,761.44 rows=14,354 width=156) (actual time=39.905..119.874 rows=23,340 loops=1)

  • Hash Cond: (tracker.buyer_id = u.id)
3. 11.345 109.611 ↓ 1.6 23,340 1

Hash Left Join (cost=3,210.37..3,717.48 rows=14,354 width=155) (actual time=39.864..109.611 rows=23,340 loops=1)

  • Hash Cond: (camp.keitaro_campaign_id = tracker.id)
4. 11.212 95.083 ↓ 1.6 23,340 1

Hash Join (cost=2,933.89..3,403.31 rows=14,354 width=155) (actual time=36.651..95.083 rows=23,340 loops=1)

  • Hash Cond: (camp.adaccount_id = acc.id)
5. 13.112 81.632 ↓ 1.6 23,340 1

Hash Join (cost=2,636.86..3,068.57 rows=14,354 width=157) (actual time=34.392..81.632 rows=23,340 loops=1)

  • Hash Cond: (adset.adcampaign_id = camp.id)
6. 13.672 65.206 ↓ 1.6 23,340 1

Hash Join (cost=2,414.93..2,808.93 rows=14,354 width=108) (actual time=31.065..65.206 rows=23,340 loops=1)

  • Hash Cond: (crea.adset_id = adset.id)
7. 11.044 44.029 ↓ 1.6 23,340 1

Hash Right Join (cost=1,930.20..2,286.51 rows=14,354 width=76) (actual time=23.534..44.029 rows=23,340 loops=1)

  • Hash Cond: (facebook__ad_costs.adcreative_id = crea.id)
8. 17.990 24.837 ↓ 1.0 14,193 1

HashAggregate (cost=1,068.24..1,245.50 rows=14,181 width=52) (actual time=15.349..24.837 rows=14,193 loops=1)

  • Group Key: facebook__ad_costs.id
9. 6.847 6.847 ↓ 1.0 14,193 1

Seq Scan on facebook__ad_costs (cost=0.00..961.88 rows=14,181 width=22) (actual time=1.494..6.847 rows=14,193 loops=1)

  • Filter: ((date >= '2019-12-01'::date) AND (date <= '2020-01-10'::date))
  • Rows Removed by Filter: 11011
10. 4.445 8.148 ↓ 1.0 14,364 1

Hash (cost=682.54..682.54 rows=14,354 width=36) (actual time=8.148..8.148 rows=14,364 loops=1)

  • Buckets: 16384 Batches: 1 Memory Usage: 1078kB
11. 3.703 3.703 ↓ 1.0 14,364 1

Seq Scan on facebook__ad_creatives crea (cost=0.00..682.54 rows=14,354 width=36) (actual time=0.012..3.703 rows=14,364 loops=1)

12. 4.292 7.505 ↓ 1.0 12,305 1

Hash (cost=330.99..330.99 rows=12,299 width=40) (actual time=7.505..7.505 rows=12,305 loops=1)

  • Buckets: 16384 Batches: 1 Memory Usage: 991kB
13. 3.213 3.213 ↓ 1.0 12,305 1

Seq Scan on facebook__ad_sets adset (cost=0.00..330.99 rows=12,299 width=40) (actual time=0.012..3.213 rows=12,305 loops=1)

14. 1.832 3.314 ↑ 1.0 5,197 1

Hash (cost=156.97..156.97 rows=5,197 width=57) (actual time=3.314..3.314 rows=5,197 loops=1)

  • Buckets: 8192 Batches: 1 Memory Usage: 499kB
15. 1.482 1.482 ↑ 1.0 5,197 1

Seq Scan on facebook__ad_campaigns camp (cost=0.00..156.97 rows=5,197 width=57) (actual time=0.011..1.482 rows=5,197 loops=1)

16. 0.982 2.239 ↑ 1.0 4,179 1

Hash (cost=244.79..244.79 rows=4,179 width=6) (actual time=2.239..2.239 rows=4,179 loops=1)

  • Buckets: 8192 Batches: 1 Memory Usage: 228kB
17. 1.257 1.257 ↑ 1.0 4,179 1

Seq Scan on facebook__ad_accounts acc (cost=0.00..244.79 rows=4,179 width=6) (actual time=0.016..1.257 rows=4,179 loops=1)

18. 1.623 3.183 ↑ 1.0 6,599 1

Hash (cost=193.99..193.99 rows=6,599 width=8) (actual time=3.183..3.183 rows=6,599 loops=1)

  • Buckets: 8192 Batches: 1 Memory Usage: 320kB
19. 1.560 1.560 ↑ 1.0 6,599 1

Seq Scan on tracker_keitarocampaign tracker (cost=0.00..193.99 rows=6,599 width=8) (actual time=0.015..1.560 rows=6,599 loops=1)

20. 0.012 0.029 ↓ 17.0 34 1

Hash (cost=1.02..1.02 rows=2 width=9) (actual time=0.029..0.029 rows=34 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 10kB
21. 0.017 0.017 ↓ 17.0 34 1

Seq Scan on core_user u (cost=0.00..1.02 rows=2 width=9) (actual time=0.010..0.017 rows=34 loops=1)

22. 0.255 20.267 ↓ 4.7 944 1

Hash (cost=1,151.07..1,151.07 rows=200 width=40) (actual time=20.267..20.267 rows=944 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 53kB
23. 0.159 20.012 ↓ 4.7 945 1

Subquery Scan on conv (cost=1,146.57..1,151.07 rows=200 width=40) (actual time=19.459..20.012 rows=945 loops=1)

24. 8.047 19.853 ↓ 4.7 945 1

HashAggregate (cost=1,146.57..1,149.07 rows=200 width=40) (actual time=19.457..19.853 rows=945 loops=1)

  • Group Key: tracker_keitaroconversion.creative
25. 11.806 11.806 ↓ 1.2 29,749 1

Index Scan using tracker_kei_date_6615e4_idx on tracker_keitaroconversion (cost=0.29..1,020.32 rows=25,250 width=13) (actual time=0.034..11.806 rows=29,749 loops=1)

  • Index Cond: ((date >= '2019-12-01'::date) AND (date <= '2020-01-10'::date))
Planning time : 2.490 ms
Execution time : 152.181 ms