explain.depesz.com

PostgreSQL's explain analyze made readable

Result: CXjN

Settings
# exclusive inclusive rows x rows loops node
1. 0.020 84.193 ↑ 1.0 1 1

Aggregate (cost=14.89..14.90 rows=1 width=0) (actual time=84.192..84.193 rows=1 loops=1)

  • Buffers: shared hit=111 read=134
2. 0.048 84.173 ↓ 1.6 8 1

Nested Loop (cost=0.37..14.89 rows=5 width=0) (actual time=43.528..84.173 rows=8 loops=1)

  • Buffers: shared hit=111 read=134
3. 0.053 84.069 ↓ 1.6 8 1

Nested Loop (cost=0.28..14.40 rows=5 width=12) (actual time=43.513..84.069 rows=8 loops=1)

  • Buffers: shared hit=81 read=134
4. 0.182 82.152 ↑ 2.8 8 1

Nested Loop (cost=0.20..11.87 rows=22 width=8) (actual time=43.442..82.152 rows=8 loops=1)

  • Buffers: shared hit=66 read=119
5. 21.688 21.688 ↓ 1.4 34 1

Index Scan using index_company_connections_on_company_id on company_connections (cost=0.08..2.29 rows=24 width=4) (actual time=2.451..21.688 rows=34 loops=1)

  • Index Cond: (company_id = 28352)
  • Filter: ((status)::text <> 'pending'::text)
  • Buffers: shared hit=1 read=35
6. 60.282 60.282 ↓ 0.0 0 34

Index Scan using index_logs_on_driver_id_and_date_and_driver_signed_at on logs (cost=0.11..0.40 rows=1 width=4) (actual time=1.773..1.773 rows=0 loops=34)

  • Index Cond: ((driver_id = company_connections.user_id) AND (date >= '2018-04-30'::date) AND (date <= '2018-04-30'::date))
  • Filter: (NOT is_hidden)
  • Rows Removed by Filter: 0
  • Buffers: shared hit=65 read=84
7. 1.864 1.864 ↑ 1.0 1 8

Index Only Scan using index_users_id_and_created_at_and_role on users drivers_logs (cost=0.09..0.11 rows=1 width=4) (actual time=0.231..0.233 rows=1 loops=8)

  • Index Cond: (id = logs.driver_id)
  • Heap Fetches: 4
  • Buffers: shared hit=15 read=15
8. 0.056 0.056 ↑ 1.0 1 8

Index Only Scan using index_users_id_and_created_at_and_role on users (cost=0.09..0.10 rows=1 width=4) (actual time=0.006..0.007 rows=1 loops=8)

  • Index Cond: (id = drivers_logs.id)
  • Heap Fetches: 4
  • Buffers: shared hit=30