explain.depesz.com

PostgreSQL's explain analyze made readable

Result: ZEC1

Settings
# exclusive inclusive rows x rows loops node
1. 0.008 20.559 ↓ 0.0 0 1

Hash Join (cost=6,069.39..18,767.11 rows=1 width=104) (actual time=20.558..20.559 rows=0 loops=1)

  • Hash Cond: (r.salesman_id = s.id)
2. 0.004 20.522 ↓ 0.0 0 1

Hash Join (cost=6,043.79..18,741.50 rows=2 width=112) (actual time=20.522..20.522 rows=0 loops=1)

  • Hash Cond: (rd.route_id = r.id)
3. 0.030 0.030 ↑ 152,772.0 1 1

Seq Scan on salesman_route_detail rd (cost=0.00..12,296.66 rows=152,772 width=112) (actual time=0.030..0.030 rows=1 loops=1)

  • Filter: (enabled AND (NOT is_deleted))
4. 0.001 20.488 ↓ 0.0 0 1

Hash (cost=6,043.78..6,043.78 rows=1 width=16) (actual time=20.488..20.488 rows=0 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 8kB
5. 20.487 20.487 ↓ 0.0 0 1

Seq Scan on salesman_route r (cost=0.00..6,043.78 rows=1 width=16) (actual time=20.487..20.487 rows=0 loops=1)

  • Filter: (enabled AND (NOT is_deleted) AND (route_date >= now()) AND (route_date <= now()))
  • Rows Removed by Filter: 52,132
6. 0.003 0.029 ↑ 1.0 5 1

Hash (cost=25.54..25.54 rows=5 width=8) (actual time=0.029..0.029 rows=5 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 9kB
7. 0.026 0.026 ↑ 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.012..0.026 rows=5 loops=1)

  • Index Cond: (id = ANY ('{1,2,3,4,5}'::bigint[]))
  • Heap Fetches: 4
Planning time : 0.516 ms
Execution time : 20.628 ms