explain.depesz.com

PostgreSQL's explain analyze made readable

Result: QKQ : 345

Settings
# exclusive inclusive rows x rows loops node
1. 0.009 345.982 ↑ 1.7 139 1

Limit (cost=999,521.20..999,524.09 rows=231 width=28) (actual time=345.942..345.982 rows=139 loops=1)

2. 0.028 345.973 ↑ 1.7 139 1

Unique (cost=999,521.20..999,524.09 rows=231 width=28) (actual time=345.941..345.973 rows=139 loops=1)

3. 0.069 345.945 ↑ 1.7 139 1

Sort (cost=999,521.20..999,521.78 rows=231 width=28) (actual time=345.939..345.945 rows=139 loops=1)

  • Sort Key: t.mobject_id, t.trip_pass_status, (count(trs.is_konechka)), (count(((NOT trs.is_konechka) OR (trs.is_konechka IS NULL))))
  • Sort Method: quicksort Memory: 35kB
4. 0.097 345.876 ↑ 1.7 139 1

GroupAggregate (cost=999,506.94..999,512.14 rows=231 width=28) (actual time=345.786..345.876 rows=139 loops=1)

  • Group Key: t.mobject_id, t.trip_pass_status
5. 0.258 345.779 ↑ 1.1 218 1

Sort (cost=999,506.94..999,507.52 rows=231 width=13) (actual time=345.769..345.779 rows=218 loops=1)

  • Sort Key: t.mobject_id, t.trip_pass_status
  • Sort Method: quicksort Memory: 35kB
6. 1.609 345.521 ↑ 1.1 218 1

Nested Loop (cost=1.63..999,497.87 rows=231 width=13) (actual time=7.196..345.521 rows=218 loops=1)

7. 170.442 170.442 ↓ 3.1 4,565 1

Index Scan using uzgps_routing_trip_mobject_id_time_start_time_end_status_idx on uzgps_routing_trip t (cost=1.07..106,626.51 rows=1,475 width=20) (actual time=0.666..170.442 rows=4,565 loops=1)

  • Index Cond: ((time_start > trip_routing_uzb.timetomillisecond((date_trunc('day'::text, now()) + '03:00:00'::interval))) AND (time_end < trip_routing_uzb.timetomillisecond((date_trunc('day'::text, now()) + '23:00:00'::interval))))
  • Filter: (status = 'A'::bpchar)
  • Rows Removed by Filter: 1553
8. 173.470 173.470 ↓ 0.0 0 4,565

Index Scan using uzgps_routing_trip_route_station_trip_id_idx on uzgps_routing_trip_route_station trs (cost=0.56..605.31 rows=3 width=9) (actual time=0.037..0.038 rows=0 loops=4,565)

  • Index Cond: (trip_id = t.id)
  • Filter: ((time_period_parking_exceed > 0) AND (status = 'A'::bpchar))
  • Rows Removed by Filter: 34