explain.depesz.com

PostgreSQL's explain analyze made readable

Result: DiJd

Settings
# exclusive inclusive rows x rows loops node
1. 1,952,163.390 24,462,366.682 ↓ 0.0 0 1

" Insert on travel_metric_odp_new (cost=54,253.10..688,964,289.01 rows=96,361,425 width=1,191) (actual time=24,462,366.682..24,462,366.682 rows=0 loops=1)

  • Buffers: shared hit=1908446275 read=91003954 dirtied=34846069
2. 906,402.728 22,510,203.292 ↓ 4.3 418,307,458 1

Merge Left Join (cost=54,253.10..688,000,674.76 rows=96,361,425 width=1,191) (actual time=295,698.203..22,510,203.292 rows=418,307,458 loops=1)

  • Merge Cond: ((o.project_id = b.project_id) AND (o.vehicle_type_id = b.vehicle_type_id) AND (o.vehicle_weight_id = b.vehicle_weight_id) AND (o.oz_id = b.oz_id) AND (o.dz_id = b.dz_id) AND (o.day_type = b.day_type) AND (o.day_part = b.day_part))
  • Buffers: shared hit=1419678977 read=56157651 dirtied=53
3. 434,003.749 13,530,305.025 ↓ 4.3 418,307,458 1

Merge Left Join (cost=54,252.53..477,740,811.44 rows=96,361,425 width=587) (actual time=207,336.019..13,530,305.025 rows=418,307,458 loops=1)

  • Merge Cond: ((o.project_id = a.project_id) AND (o.vehicle_type_id = a.vehicle_type_id) AND (o.vehicle_weight_id = a.vehicle_weight_id) AND (o.oz_id = a.oz_id) AND (o.dz_id = a.dz_id) AND (o.day_type = a.day_type) AND (o.day_part = a.day_part))
  • Buffers: shared hit=713880082 read=35717860
4. 172,278.555 3,034,679.579 ↓ 4.3 418,307,458 1

Merge Join (cost=54,251.96..298,960,734.14 rows=96,361,425 width=44) (actual time=37,127.688..3,034,679.579 rows=418,307,458 loops=1)

  • Merge Cond: (o.project_id = p.project_id)
  • Buffers: shared hit=445070975 read=8294047
5. 2,860,166.126 2,860,166.126 ↑ 1.0 529,156,918 1

Index Scan using ix_travel_metric_odp5 on travel_metric_odp5 o (cost=0.57..296,615,079.90 rows=529,206,464 width=44) (actual time=5.473..2,860,166.126 rows=529,156,918 loops=1)

  • Buffers: shared hit=444992669 read=8289466
6. 2,234.898 2,234.898 ↑ 1.3 12,661 1

Index Scan using project_pkey on project p (cost=0.29..59,042.71 rows=16,032 width=4) (actual time=671.867..2,234.898 rows=12,661 loops=1)

  • Filter: ((enable_prem_a OR enable_prem_b) AND (project_type_id = 101))
  • Rows Removed by Filter: 75422
  • Buffers: shared hit=78306 read=4581
7. 10,061,621.697 10,061,621.697 ↑ 1.0 309,517,032 1

Index Scan using ix_travel_metric_prem_a01 on travel_metric_prem_a5 a (cost=0.57..171,668,994.74 rows=309,615,776 width=563) (actual time=0.041..10,061,621.697 rows=309,517,032 loops=1)

  • Buffers: shared hit=268809107 read=27423813
8. 8,073,495.539 8,073,495.539 ↓ 1.0 322,747,357 1

Index Scan using ix_travel_metric_prem_b5 on travel_metric_prem_b5 b (cost=0.57..202,684,910.78 rows=322,746,048 width=616) (actual time=6.267..8,073,495.539 rows=322,747,357 loops=1)

  • Buffers: shared hit=287491429 read=20439784
Planning time : 140.845 ms
Execution time : 24,462,367.534 ms