explain.depesz.com

PostgreSQL's explain analyze made readable

Result: WDXh : Optimization for: plan #BdTu

Settings

Optimization path:

# exclusive inclusive rows x rows loops node
1. 0.000 0.000 ↓ 0.0

Insert on travel_metric_odmf_new (cost=54,238.64..630,088,517.95 rows=64,132,817 width=1,194) (actual rows= loops=)

2. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=54,238.64..629,447,189.78 rows=64,132,817 width=1,194) (actual rows= loops=)

3. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=54,238.06..465,524,115.90 rows=64,132,817 width=590) (actual rows= loops=)

4. 0.000 0.000 ↓ 0.0

Merge Join (cost=54,237.49..301,766,477.96 rows=64,132,817 width=48) (actual rows= loops=)

  • Merge Cond: (o.project_id = p.project_id)
5. 0.000 0.000 ↓ 0.0

Index Scan using ix_travel_metric_odp5 on travel_metric_odp5 o (cost=0.57..299,743,198.11 rows=529,157,344 width=48) (actual rows= loops=)

6. 0.000 0.000 ↓ 0.0

Index Scan using project_pkey on project p (cost=0.29..59,042.71 rows=10,671 width=4) (actual rows= loops=)

  • Filter: (project_type_id = 106)
7. 0.000 0.000 ↓ 0.0

Index Scan using ix_travel_metric_prem_a5 on travel_metric_prem_a5 a (cost=0.57..2.54 rows=1 width=566) (actual rows= loops=)

  • Index Cond: ((o.project_id = project_id) AND (o.vehicle_type_id = vehicle_type_id) AND (o.vehicle_weight_id = vehicle_weight_id) AND (o.oz_id = oz_id) AND (o.dz_id = dz_id) AND (o.day_type = day_type) AND (o.day_part = day_part))
  • Filter: (o.mfz_id = mfz_id)
8. 0.000 0.000 ↓ 0.0

Index Scan using ix_travel_metric_prem_b5 on travel_metric_prem_b5 b (cost=0.57..2.54 rows=1 width=620) (actual rows= loops=)

  • Index Cond: ((o.project_id = project_id) AND (o.vehicle_type_id = vehicle_type_id) AND (o.vehicle_weight_id = vehicle_weight_id) AND (o.oz_id = oz_id) AND (o.dz_id = dz_id) AND (o.day_type = day_type) AND (o.day_part = day_part))
  • Filter: (o.mfz_id = mfz_id)