explain.depesz.com

PostgreSQL's explain analyze made readable

Result: Gckd

Settings
# exclusive inclusive rows x rows loops node
1. 0.013 161,525.230 ↑ 1.0 10 1

Limit (cost=2,887,521.40..2,887,521.43 rows=10 width=12) (actual time=161,525.202..161,525.230 rows=10 loops=1)

  • Buffers: shared hit=4823877 read=1598126 dirtied=7381
2. 141.623 161,525.217 ↑ 3,268.0 10 1

HashAggregate (cost=2,887,521.40..2,887,619.44 rows=32,680 width=12) (actual time=161,525.199..161,525.217 rows=10 loops=1)

  • Group Key: us.id
  • Buffers: shared hit=4823877 read=1598126 dirtied=7381
3. 265.467 161,383.594 ↓ 2.9 93,442 1

Nested Loop Left Join (cost=2,835,059.35..2,887,488.72 rows=32,680 width=12) (actual time=156,225.340..161,383.594 rows=93,442 loops=1)

  • Buffers: shared hit=4823877 read=1598126 dirtied=7381
4. 4,187.000 160,277.149 ↓ 2.9 93,442 1

Bitmap Heap Scan on eld_events ed (cost=2,835,059.26..2,882,795.68 rows=32,680 width=12) (actual time=156,225.239..160,277.149 rows=93,442 loops=1)

  • Recheck Cond: ((vehicle_id IS NULL) AND ("time" > '2019-03-06 00:00:00'::timestamp without time zone))
  • Rows Removed by Index Recheck: 4443286
  • Filter: ((type = 1) AND (code = 3))
  • Rows Removed by Filter: 632720
  • Heap Blocks: exact=132097 lossy=172777
  • Buffers: shared hit=4408941 read=1598126 dirtied=7381
5. 15,177.008 156,090.149 ↓ 0.0 0 1

BitmapAnd (cost=2,835,059.26..2,835,059.26 rows=458,871 width=0) (actual time=156,090.149..156,090.149 rows=0 loops=1)

  • Buffers: shared hit=4228866 read=1473327
6. 61,278.694 61,278.694 ↑ 1.0 131,853,930 1

Bitmap Index Scan on fk__eld_events_copy_vehicle_id (cost=0.00..242,406.22 rows=136,341,467 width=0) (actual time=61,278.694..61,278.694 rows=131,853,930 loops=1)

  • Index Cond: (vehicle_id IS NULL)
  • Buffers: shared hit=332663 read=29976
7. 79,634.447 79,634.447 ↓ 1.7 7,777,776 1

Bitmap Index Scan on fk__eld_events_copy_driver_id_and_time (cost=0.00..2,592,649.73 rows=4,613,312 width=0) (actual time=79,634.447..79,634.447 rows=7,777,776 loops=1)

  • Index Cond: ("time" > '2019-03-06 00:00:00'::timestamp without time zone)
  • Buffers: shared hit=3896203 read=1443351
8. 840.978 840.978 ↑ 1.0 1 93,442

Index Only Scan using users_pkey on users us (cost=0.09..0.14 rows=1 width=4) (actual time=0.007..0.009 rows=1 loops=93,442)

  • Index Cond: (id = ed.driver_id)
  • Heap Fetches: 123363
  • Buffers: shared hit=414936
Planning time : 1.132 ms
Execution time : 161,681.662 ms