explain.depesz.com

PostgreSQL's explain analyze made readable

Result: pwLa

Settings
# exclusive inclusive rows x rows loops node
1. 0.001 0.026 ↓ 0.0 0 1

Limit (cost=43.63..63.30 rows=1 width=268) (actual time=0.025..0.026 rows=0 loops=1)

2. 0.001 0.025 ↓ 0.0 0 1

Result (cost=43.63..63.30 rows=1 width=268) (actual time=0.024..0.025 rows=0 loops=1)

3. 0.006 0.024 ↓ 0.0 0 1

Sort (cost=43.63..43.64 rows=1 width=215) (actual time=0.024..0.024 rows=0 loops=1)

  • Sort Key: os.inserted_at DESC
  • Sort Method: quicksort Memory: 25kB
4. 0.001 0.018 ↓ 0.0 0 1

Nested Loop Left Join (cost=26.15..43.62 rows=1 width=215) (actual time=0.018..0.018 rows=0 loops=1)

  • Join Filter: (routes.order_id = mis.id)
5. 0.000 0.017 ↓ 0.0 0 1

Nested Loop Left Join (cost=25.88..42.07 rows=1 width=268) (actual time=0.017..0.017 rows=0 loops=1)

6. 0.001 0.017 ↓ 0.0 0 1

Nested Loop Left Join (cost=25.60..41.72 rows=1 width=249) (actual time=0.017..0.017 rows=0 loops=1)

7. 0.000 0.016 ↓ 0.0 0 1

Nested Loop (cost=1.10..17.19 rows=1 width=233) (actual time=0.016..0.016 rows=0 loops=1)

8. 0.001 0.016 ↓ 0.0 0 1

Nested Loop (cost=0.82..16.88 rows=1 width=166) (actual time=0.016..0.016 rows=0 loops=1)

9. 0.015 0.015 ↓ 0.0 0 1

Index Scan using products_parcel_id_idx on products pr (cost=0.41..8.43 rows=1 width=16) (actual time=0.015..0.015 rows=0 loops=1)

  • Index Cond: (parcel_id = '6236739733'::text)
10. 0.000 0.000 ↓ 0.0 0

Index Scan using delivery_id_index on orders_stores os (cost=0.41..8.45 rows=1 width=166) (never executed)

  • Index Cond: (id = pr.delivery_id)
11. 0.000 0.000 ↓ 0.0 0

Index Scan using admin_vendor_store_idx on vendor_stores vs (cost=0.28..0.31 rows=1 width=99) (never executed)

  • Index Cond: (id = os.sender_store_id)
12. 0.000 0.000 ↓ 0.0 0

Limit (cost=24.50..24.51 rows=1 width=20) (never executed)

13. 0.000 0.000 ↓ 0.0 0

Sort (cost=24.50..24.51 rows=1 width=20) (never executed)

  • Sort Key: mis.mission_index DESC
14. 0.000 0.000 ↓ 0.0 0

Index Scan using missions_delivery_index on missions mis (cost=0.41..24.49 rows=1 width=20) (never executed)

  • Index Cond: (delivery_id = os.id)
  • Filter: (courier_id = os.assigned_courier_id)
15. 0.000 0.000 ↓ 0.0 0

Index Scan using admin_couriers_id on couriers c (cost=0.28..0.35 rows=1 width=35) (never executed)

  • Index Cond: (id = os.assigned_courier_id)
16. 0.000 0.000 ↓ 0.0 0

Index Scan using realtime_fixed_routes_courier_idx on fixed_routes routes (cost=0.28..1.04 rows=39 width=37) (never executed)

  • Index Cond: (courier_id = os.assigned_courier_id)
17.          

SubPlan (for Result)

18. 0.000 0.000 ↓ 0.0 0

Seq Scan on regions (cost=10.12..11.18 rows=1 width=32) (never executed)

  • Filter: (id = $5)
19.          

Initplan (for Seq Scan)

20. 0.000 0.000 ↓ 0.0 0

Limit (cost=8.42..10.12 rows=1 width=16) (never executed)

21. 0.000 0.000 ↓ 0.0 0

Seq Scan on areas_to_regions_mapping map (cost=8.42..10.12 rows=1 width=16) (never executed)

  • Filter: (((COALESCE(os.order_metadata, ''::text) <> 'return'::text) AND (area_id = os.area_id)) OR ((os.order_metadata = 'return'::text) AND (hashed SubPlan 1)))
22.          

SubPlan (for Seq Scan)

23. 0.000 0.000 ↓ 0.0 0

Index Scan using area_geom_idx on areas (cost=0.14..8.41 rows=1 width=4) (never executed)

  • Index Cond: (geom ~ st_setsrid(st_makepoint(vs.longitude, vs.latitude), 4326))
  • Filter: _st_contains(geom, st_setsrid(st_makepoint(vs.longitude, vs.latitude), 4326))
24. 0.000 0.000 ↓ 0.0 0

Aggregate (cost=8.30..8.31 rows=1 width=8) (never executed)

25. 0.000 0.000 ↓ 0.0 0

Index Scan using products_delivery_id_idx on products pr2 (cost=0.29..8.30 rows=1 width=15) (never executed)

  • Index Cond: (delivery_id = os.id)
Planning time : 1.271 ms
Execution time : 0.227 ms