explain.depesz.com

PostgreSQL's explain analyze made readable

Result: BCah

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

Sort (cost=105,791.62..105,791.78 rows=64 width=199) (actual rows= loops=)

  • Sort Key: route_legs.estimatedstarttime
2. 0.000 0.000 ↓ 0.0

Nested Loop (cost=3.60..105,789.70 rows=64 width=199) (actual rows= loops=)

3. 0.000 0.000 ↓ 0.0

Nested Loop (cost=3.17..105,751.43 rows=64 width=174) (actual rows= loops=)

4. 0.000 0.000 ↓ 0.0

Nested Loop (cost=2.73..105,713.16 rows=64 width=149) (actual rows= loops=)

5. 0.000 0.000 ↓ 0.0

Nested Loop (cost=2.30..105,680.20 rows=64 width=140) (actual rows= loops=)

6. 0.000 0.000 ↓ 0.0

Nested Loop (cost=1.86..105,670.31 rows=14 width=133) (actual rows= loops=)

7. 0.000 0.000 ↓ 0.0

Nested Loop (cost=1.43..105,661.99 rows=14 width=115) (actual rows= loops=)

8. 0.000 0.000 ↓ 0.0

Nested Loop (cost=1.00..105,563.68 rows=14 width=115) (actual rows= loops=)

9. 0.000 0.000 ↓ 0.0

Index Scan using route_legs_idx_created on route_legs (cost=0.44..666.95 rows=9,281 width=73) (actual rows= loops=)

  • Index Cond: (createdtime > (('now'::cstring)::date - 2))
10. 0.000 0.000 ↓ 0.0

Index Scan using route_leg_drivers_pkey on route_leg_drivers (cost=0.56..11.29 rows=1 width=42) (actual rows= loops=)

  • Index Cond: (route_leg_id = route_legs.id)
  • Filter: ((offer_canceled_time IS NULL) AND ((leg_failed_time IS NULL) OR (leg_failed_time > (('now'::cstring)::date - 2))) AND ((offertime > (('now'::cstring)::date - 2)) OR (route_legs.deliverystatus IS NU (...)
11. 0.000 0.000 ↓ 0.0

Index Scan using routes_pkey on routes (cost=0.43..7.01 rows=1 width=16) (actual rows= loops=)

  • Index Cond: (id = route_legs.routeid)
12. 0.000 0.000 ↓ 0.0

Index Scan using orders_pkey on orders (cost=0.43..0.58 rows=1 width=26) (actual rows= loops=)

  • Index Cond: (id = routes.orderid)
13. 0.000 0.000 ↓ 0.0

Index Scan using route_leg_actions_idx_legid on route_leg_actions rla (cost=0.43..0.66 rows=5 width=23) (actual rows= loops=)

  • Index Cond: (legid = route_leg_drivers.route_leg_id)
14. 0.000 0.000 ↓ 0.0

Index Scan using packages_pkey on packages p (cost=0.43..0.51 rows=1 width=25) (actual rows= loops=)

  • Index Cond: (id = rla.packageid)
15. 0.000 0.000 ↓ 0.0

Index Scan using contact_details_pkey on contact_details cc (cost=0.43..0.59 rows=1 width=41) (actual rows= loops=)

  • Index Cond: (id = p.collectioncontact)
16. 0.000 0.000 ↓ 0.0

Index Scan using contact_details_pkey on contact_details dc (cost=0.43..0.59 rows=1 width=41) (actual rows= loops=)

  • Index Cond: (id = p.deliverycontact)