explain.depesz.com

PostgreSQL's explain analyze made readable

Result: g8wK

Settings
# exclusive inclusive rows x rows loops node
1. 0.028 10,367.661 ↑ 1.0 1 1

Aggregate (cost=0.81..0.81 rows=1 width=0) (actual time=10,367.660..10,367.661 rows=1 loops=1)

  • Buffers: shared hit=2989330 read=98624 dirtied=4616
2. 595.252 10,367.633 ↓ 8.0 8 1

Nested Loop (cost=0.37..0.81 rows=1 width=0) (actual time=116.564..10,367.633 rows=8 loops=1)

  • Buffers: shared hit=2989330 read=98624 dirtied=4616
3. 859.395 8,088.314 ↓ 240,581.0 240,581 1

Nested Loop (cost=0.29..0.72 rows=1 width=12) (actual time=0.197..8,088.314 rows=240,581 loops=1)

  • Buffers: shared hit=2266767 read=98336 dirtied=4616
4. 998.040 5,785.433 ↓ 240,581.0 240,581 1

Nested Loop (cost=0.20..0.61 rows=1 width=8) (actual time=0.182..5,785.433 rows=240,581 loops=1)

  • Buffers: shared hit=1169655 read=98335 dirtied=428
5. 2,141.002 2,141.002 ↓ 240,581.0 240,581 1

Index Scan using index_logs_on_date_is_hidden on logs (cost=0.11..0.32 rows=1 width=4) (actual time=0.110..2,141.002 rows=240,581 loops=1)

  • Index Cond: ((date >= '2018-04-30'::date) AND (date <= '2018-04-30'::date))
  • Buffers: shared hit=72542 read=98335 dirtied=8
6. 2,646.391 2,646.391 ↑ 1.0 1 240,581

Index Only Scan using users_pkey on users drivers_logs (cost=0.09..0.29 rows=1 width=4) (actual time=0.010..0.011 rows=1 loops=240,581)

  • Index Cond: (id = logs.driver_id)
  • Heap Fetches: 220951
  • Buffers: shared hit=1097113 dirtied=420
7. 1,443.486 1,443.486 ↑ 1.0 1 240,581

Index Only Scan using users_pkey on users (cost=0.09..0.10 rows=1 width=4) (actual time=0.004..0.006 rows=1 loops=240,581)

  • Index Cond: (id = drivers_logs.id)
  • Heap Fetches: 220951
  • Buffers: shared hit=1097112 read=1 dirtied=4188
8. 1,684.067 1,684.067 ↓ 0.0 0 240,581

Index Only Scan using index_company_connections_on_company_id_status on company_connections (cost=0.08..0.09 rows=1 width=4) (actual time=0.007..0.007 rows=0 loops=240,581)

  • Index Cond: ((user_id = drivers_logs.id) AND (company_id = 28352))
  • Heap Fetches: 1
  • Buffers: shared hit=722563 read=288