explain.depesz.com

PostgreSQL's explain analyze made readable

Result: WjVe

Settings
# exclusive inclusive rows x rows loops node
1. 0.144 19.558 ↓ 1.4 574 1

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

  • Sort Key: route.departure
  • Sort Method: quicksort Memory: 131kB
2. 8.744 19.414 ↓ 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=18.675..19.414 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. 4.743 10.670 ↓ 1.0 57,668 1

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

5. 5.927 5.927 ↓ 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.033..5.927 rows=57,668 loops=1)

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