explain.depesz.com

PostgreSQL's explain analyze made readable

Result: hpMv

Settings
# exclusive inclusive rows x rows loops node
1. 2,583.479 25,786.319 ↑ 1.0 981,583 1

Gather (cost=964,118.12..1,141,844.48 rows=992,742 width=2,109) (actual time=17,358.228..25,786.319 rows=981,583 loops=1)

  • Workers Planned: 1
  • Workers Launched: 1
2. 604.460 23,202.840 ↑ 1.2 490,792 2 / 2

Merge Left Join (cost=963,118.12..1,041,570.28 rows=583,966 width=2,109) (actual time=17,298.578..23,202.840 rows=490,792 loops=2)

  • Merge Cond: ((facts.as_id = dfp_pv.as_id) AND (events.hour_timestamp = dfp_pv.hour_timestamp))
3. 584.810 20,784.806 ↑ 1.2 490,792 2 / 2

Merge Left Join (cost=963,117.69..1,005,335.04 rows=583,966 width=2,104) (actual time=17,298.563..20,784.806 rows=490,792 loops=2)

  • Merge Cond: ((facts.as_id = dfp_revenue.as_id) AND (events.hour_timestamp = dfp_revenue.hour_timestamp))
4. 893.103 19,858.401 ↑ 1.2 490,792 2 / 2

Merge Left Join (cost=963,117.27..971,489.18 rows=583,966 width=2,096) (actual time=17,298.537..19,858.401 rows=490,792 loops=2)

  • Merge Cond: ((facts.as_id = avantis.as_id) AND (events.hour_timestamp = avantis.hour_timestamp))
5. 10,088.139 13,910.274 ↑ 1.2 490,792 2 / 2

Sort (cost=914,000.84..915,460.75 rows=583,966 width=2,088) (actual time=12,598.706..13,910.274 rows=490,792 loops=2)

  • Sort Key: facts.as_id, events.hour_timestamp
  • Sort Method: external merge Disk: 711,872kB
  • Worker 0: Sort Method: external merge Disk: 753,424kB
6. 2,003.012 3,822.135 ↑ 1.2 490,792 2 / 2

Parallel Hash Join (cost=27,642.95..240,798.56 rows=583,966 width=2,088) (actual time=2,748.286..3,822.135 rows=490,792 loops=2)

  • Hash Cond: (events.ad_id = facts.ad_id)
7. 1,270.551 1,270.551 ↑ 1.2 496,517 2 / 2

Parallel Seq Scan on mv_tableau_hourly_fb_all_events events (cost=0.00..63,055.65 rows=583,965 width=920) (actual time=0.771..1,270.551 rows=496,517 loops=2)

8. 246.484 548.572 ↑ 1.2 56,627 2 / 2

Parallel Hash (cost=16,921.20..16,921.20 rows=66,620 width=1,186) (actual time=548.571..548.572 rows=56,627 loops=2)

  • Buckets: 8,192 Batches: 32 Memory Usage: 3,936kB
9. 302.088 302.088 ↑ 1.2 56,627 2 / 2

Parallel Seq Scan on mv_tableau_fb_facts facts (cost=0.00..16,921.20 rows=66,620 width=1,186) (actual time=0.201..302.088 rows=56,627 loops=2)

10. 73.830 5,055.024 ↓ 1.0 386,350 2 / 2

Materialize (cost=49,116.43..51,047.89 rows=386,292 width=39) (actual time=4,699.814..5,055.024 rows=386,350 loops=2)

11. 4,855.563 4,981.194 ↑ 1.0 386,278 2 / 2

Sort (cost=49,116.43..50,082.16 rows=386,292 width=39) (actual time=4,699.809..4,981.194 rows=386,278 loops=2)

  • Sort Key: avantis.as_id, avantis.hour_timestamp
  • Sort Method: external merge Disk: 18,904kB
  • Worker 0: Sort Method: external merge Disk: 18,904kB
12. 125.631 125.631 ↑ 1.0 386,292 2 / 2

Seq Scan on mv_tableau_hourly_avantis avantis (cost=0.00..7,082.92 rows=386,292 width=39) (actual time=0.222..125.631 rows=386,292 loops=2)

13. 341.595 341.595 ↓ 1.0 818,534 2 / 2

Index Scan using mv_tableau_hourly_dfp_revenue_idx on mv_tableau_hourly_dfp_revenue dfp_revenue (cost=0.42..26,553.50 rows=818,444 width=39) (actual time=0.019..341.595 rows=818,534 loops=2)

14. 1,813.574 1,813.574 ↓ 1.0 920,794 2 / 2

Index Scan using mv_tableau_hourly_dfp_pv_idx on mv_tableau_hourly_dfp_pv dfp_pv (cost=0.42..28,402.50 rows=920,705 width=36) (actual time=0.008..1,813.574 rows=920,794 loops=2)

Planning time : 27.533 ms
Execution time : 25,972.573 ms