explain.depesz.com

PostgreSQL's explain analyze made readable

Result: mohG

Settings
# exclusive inclusive rows x rows loops node
1. 0.153 20.470 ↓ 1.4 574 1

Sort (cost=2,253.51..2,254.54 rows=412 width=354) (actual time=20.452..20.470 rows=574 loops=1)

  • Sort Key: route.departure
  • Sort Method: quicksort Memory: 131kB
2. 8.580 20.317 ↓ 1.4 574 1

Index Scan using transport_route_unloading_datetime_index on route (cost=2,060.83..2,235.62 rows=412 width=354) (actual time=19.680..20.317 rows=574 loops=1)

  • Index Cond: (unloading_datetime > '2020-01-01 00:00:00'::timestamp without time zone)
  • Filter: ((transport_route_id IS NULL) AND (loading_datetime < '2020-01-31 23:59:59'::timestamp without time zone) AND (NOT (hashed SubPlan 1)) AND (firm_id = 12) AND (shipping = 0))
  • Rows Removed by Filter: 287
3.          

SubPlan (for Index Scan)

4. 5.114 11.737 ↓ 1.0 57,668 1

Unique (cost=0.29..1,916.41 rows=57,601 width=4) (actual time=0.082..11.737 rows=57,668 loops=1)

5. 6.623 6.623 ↓ 1.0 57,668 1

Index Only Scan using transport_itinerary_route_id_index on itinerary (cost=0.29..1,772.39 rows=57,606 width=4) (actual time=0.079..6.623 rows=57,668 loops=1)

  • Index Cond: (route_id IS NOT NULL)
  • Heap Fetches: 5,380
Planning time : 0.731 ms
Execution time : 20.565 ms