explain.depesz.com

PostgreSQL's explain analyze made readable

Result: Bzvl

Settings
# exclusive inclusive rows x rows loops node
1. 0.004 0.057 ↓ 0.0 0 1

Nested Loop (cost=8.62..12,877.82 rows=1 width=104) (actual time=0.057..0.057 rows=0 loops=1)

  • Join Filter: (r.salesman_id = s.id)
2. 0.023 0.023 ↑ 1.0 5 1

Index Only Scan using salesman_pkey on salesman s (cost=0.29..25.54 rows=5 width=8) (actual time=0.010..0.023 rows=5 loops=1)

  • Index Cond: (id = ANY ('{1,2,3,4,5}'::bigint[]))
  • Heap Fetches: 4
3. 0.000 0.030 ↓ 0.0 0 5

Materialize (cost=8.33..12,852.06 rows=3 width=112) (actual time=0.006..0.006 rows=0 loops=5)

4. 0.007 0.030 ↓ 0.0 0 1

Hash Join (cost=8.33..12,852.05 rows=3 width=112) (actual time=0.030..0.030 rows=0 loops=1)

  • Hash Cond: (rd.route_id = r.id)
5. 0.013 0.013 ↑ 158,586.0 1 1

Seq Scan on salesman_route_detail rd (cost=0.00..12,427.40 rows=158,586 width=112) (actual time=0.013..0.013 rows=1 loops=1)

  • Filter: (enabled AND (NOT is_deleted))
6. 0.000 0.010 ↓ 0.0 0 1

Hash (cost=8.31..8.31 rows=1 width=16) (actual time=0.010..0.010 rows=0 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 8kB
7. 0.010 0.010 ↓ 0.0 0 1

Index Scan using salesman_route_date_idx on salesman_route r (cost=0.29..8.31 rows=1 width=16) (actual time=0.010..0.010 rows=0 loops=1)

  • Index Cond: ((route_date >= now()) AND (route_date <= now()))
  • Filter: (enabled AND (NOT is_deleted))
Planning time : 0.691 ms
Execution time : 0.103 ms