explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 7VFq

Settings
# exclusive inclusive rows x rows loops node
1. 0.791 207.535 ↑ 30.8 337 1

HashAggregate (cost=26,468.86..26,728.46 rows=10,384 width=272) (actual time=207.322..207.535 rows=337 loops=1)

  • Group Key: adsets.id, adsets.name, insights.date_start
2. 0.553 206.744 ↑ 18.5 560 1

Hash Join (cost=5,439.16..26,209.26 rows=10,384 width=169) (actual time=206.395..206.744 rows=560 loops=1)

  • Hash Cond: (insights.ad_id = ads.id)
3. 1.816 142.063 ↑ 18.5 560 1

Hash Right Join (cost=1,022.60..21,649.92 rows=10,384 width=119) (actual time=141.963..142.063 rows=560 loops=1)

  • Hash Cond: (quality_rank.ad_id = insights.ad_id)
4. 10.645 138.633 ↑ 1.0 10,052 1

Gather (cost=1,000.00..21,484.54 rows=10,384 width=32) (actual time=134.422..138.633 rows=10,052 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
5. 127.988 127.988 ↑ 1.3 3,351 3 / 3

Parallel Seq Scan on fb_new_bm_ad_quality_detection quality_rank (cost=0.00..19,446.14 rows=4,327 width=32) (actual time=126.742..127.988 rows=3,351 loops=3)

  • Rows Removed by Filter: 264,283 Filter: (day = CURRENT_DATE)
6. 0.215 1.614 ↑ 1.0 560 1

Hash (cost=15.60..15.60 rows=560 width=119) (actual time=1.614..1.614 rows=560 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 58kB
7. 1.399 1.399 ↑ 1.0 560 1

Seq Scan on mv_tableau_fb_insights_today insights (cost=0.00..15.60 rows=560 width=119) (actual time=0.667..1.399 rows=560 loops=1)

8. 12.887 64.128 ↑ 1.0 39,523 1

Hash (cost=3,922.53..3,922.53 rows=39,523 width=86) (actual time=64.128..64.128 rows=39,523 loops=1)

  • Buckets: 65,536 Batches: 1 Memory Usage: 5,211kB
9. 7.783 51.241 ↑ 1.0 39,523 1

Hash Left Join (cost=1,581.85..3,922.53 rows=39,523 width=86) (actual time=12.747..51.241 rows=39,523 loops=1)

  • Hash Cond: (ads.campaign_id = campaigns.id)
10. 11.648 38.088 ↑ 1.0 39,523 1

Hash Left Join (cost=1,406.92..3,340.95 rows=39,523 width=104) (actual time=7.335..38.088 rows=39,523 loops=1)

  • Hash Cond: (ads.adset_id = adsets.id)
11. 19.922 19.922 ↑ 1.0 39,523 1

Seq Scan on fb_ads ads (cost=0.00..1,830.23 rows=39,523 width=70) (actual time=0.706..19.922 rows=39,523 loops=1)

12. 2.416 6.518 ↓ 1.1 11,669 1

Hash (cost=1,275.30..1,275.30 rows=10,530 width=68) (actual time=6.518..6.518 rows=11,669 loops=1)

  • Buckets: 16,384 Batches: 1 Memory Usage: 1,270kB
13. 4.102 4.102 ↓ 1.1 11,669 1

Seq Scan on fb_adsets adsets (cost=0.00..1,275.30 rows=10,530 width=68) (actual time=0.007..4.102 rows=11,669 loops=1)

14. 0.469 5.370 ↑ 1.0 3,019 1

Hash (cost=137.19..137.19 rows=3,019 width=18) (actual time=5.370..5.370 rows=3,019 loops=1)

  • Buckets: 4,096 Batches: 1 Memory Usage: 180kB
15. 4.901 4.901 ↑ 1.0 3,019 1

Seq Scan on fb_campaigns campaigns (cost=0.00..137.19 rows=3,019 width=18) (actual time=0.807..4.901 rows=3,019 loops=1)

Planning time : 48.843 ms
Execution time : 208.012 ms