explain.depesz.com

PostgreSQL's explain analyze made readable

Result: DrXg

Settings
# exclusive inclusive rows x rows loops node
1. 0.151 12.862 ↓ 1.4 574 1

Sort (cost=2,109.51..2,110.54 rows=412 width=354) (actual time=12.845..12.862 rows=574 loops=1)

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

Index Scan using transport_route_unloading_datetime_index on route (cost=1,916.83..2,091.62 rows=412 width=354) (actual time=12.083..12.711 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.136 5.136 ↓ 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.013..5.136 rows=57,668 loops=1)

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