explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 6MmJ

Settings
# exclusive inclusive rows x rows loops node
1. 0.137 1.666 ↑ 1.0 97 1

Sort (cost=358.24..358.48 rows=97 width=183) (actual time=1.658..1.666 rows=97 loops=1)

  • Sort Key: srp.start_date DESC
  • Sort Method: quicksort Memory: 38kB
2. 0.080 1.529 ↑ 1.0 97 1

Nested Loop Left Join (cost=2.93..355.04 rows=97 width=183) (actual time=0.203..1.529 rows=97 loops=1)

3. 0.142 1.061 ↑ 1.0 97 1

Nested Loop (cost=2.65..200.54 rows=97 width=176) (actual time=0.176..1.061 rows=97 loops=1)

4. 0.129 0.337 ↑ 1.0 97 1

Hash Join (cost=2.36..6.20 rows=97 width=166) (actual time=0.150..0.337 rows=97 loops=1)

  • Hash Cond: (srp.status_id = dss.shift_status_id)
5. 0.121 0.182 ↑ 1.0 97 1

Hash Join (cost=1.27..4.58 rows=97 width=166) (actual time=0.058..0.182 rows=97 loops=1)

  • Hash Cond: (srp.pos_id = dp.pos_id)
6. 0.032 0.032 ↑ 1.0 97 1

Seq Scan on shift_registry_pos srp (cost=0.00..2.97 rows=97 width=53) (actual time=0.010..0.032 rows=97 loops=1)

7. 0.017 0.029 ↓ 1.1 13 1

Hash (cost=1.12..1.12 rows=12 width=150) (actual time=0.028..0.029 rows=13 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
8. 0.012 0.012 ↓ 1.1 13 1

Seq Scan on dic_pos dp (cost=0.00..1.12 rows=12 width=150) (actual time=0.008..0.012 rows=13 loops=1)

9. 0.012 0.026 ↑ 1.0 4 1

Hash (cost=1.04..1.04 rows=4 width=32) (actual time=0.026..0.026 rows=4 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
10. 0.014 0.014 ↑ 1.0 4 1

Seq Scan on dic_shift_status dss (cost=0.00..1.04 rows=4 width=32) (actual time=0.012..0.014 rows=4 loops=1)

11. 0.582 0.582 ↑ 1.0 1 97

Index Scan using pk_shift_registry on shift_registry sr (cost=0.29..2.00 rows=1 width=15) (actual time=0.006..0.006 rows=1 loops=97)

  • Index Cond: (shift_registry_id = srp.cashdesk_shift_id)
12. 0.388 0.388 ↑ 1.0 1 97

Index Scan using pk_dic_users_id on dic_user du (cost=0.28..1.59 rows=1 width=17) (actual time=0.004..0.004 rows=1 loops=97)

  • Index Cond: (user_id = srp.closed_by)