explain.depesz.com

PostgreSQL's explain analyze made readable

Result: WHfy

Settings
# exclusive inclusive rows x rows loops node
1. 0.030 0.965 ↑ 29.2 5 1

Sort (cost=492.66..493.02 rows=146 width=183) (actual time=0.964..0.965 rows=5 loops=1)

  • Sort Key: srp.start_date DESC
  • Sort Method: quicksort Memory: 25kB
2. 0.072 0.935 ↑ 29.2 5 1

Nested Loop (cost=2.93..487.41 rows=146 width=183) (actual time=0.176..0.935 rows=5 loops=1)

  • Join Filter: ((sr.login_cashier)::text <> (du.login)::text)
  • Rows Removed by Join Filter: 76
3. 0.090 0.673 ↑ 1.5 95 1

Nested Loop (cost=2.65..274.59 rows=146 width=176) (actual time=0.128..0.673 rows=95 loops=1)

4. 0.065 0.203 ↑ 1.5 95 1

Hash Join (cost=2.36..7.12 rows=146 width=166) (actual time=0.101..0.203 rows=95 loops=1)

  • Hash Cond: (srp.status_id = dss.shift_status_id)
5. 0.071 0.111 ↑ 1.5 95 1

Hash Join (cost=1.27..5.25 rows=146 width=166) (actual time=0.046..0.111 rows=95 loops=1)

  • Hash Cond: (srp.pos_id = dp.pos_id)
6. 0.022 0.022 ↑ 1.5 95 1

Seq Scan on shift_registry_pos srp (cost=0.00..3.46 rows=146 width=53) (actual time=0.009..0.022 rows=95 loops=1)

7. 0.008 0.018 ↓ 1.1 13 1

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

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

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

9. 0.013 0.027 ↑ 1.0 4 1

Hash (cost=1.04..1.04 rows=4 width=32) (actual time=0.027..0.027 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.013..0.014 rows=4 loops=1)

11. 0.380 0.380 ↑ 1.0 1 95

Index Scan using pk_shift_registry on shift_registry sr (cost=0.29..1.83 rows=1 width=15) (actual time=0.004..0.004 rows=1 loops=95)

  • Index Cond: (shift_registry_id = srp.cashdesk_shift_id)
12. 0.190 0.190 ↑ 1.0 1 95

Index Scan using pk_dic_users_id on dic_user du (cost=0.28..1.45 rows=1 width=17) (actual time=0.002..0.002 rows=1 loops=95)

  • Index Cond: (user_id = srp.closed_by)