explain.depesz.com

PostgreSQL's explain analyze made readable

Result: wd7H9

Settings
# exclusive inclusive rows x rows loops node
1. 0.069 1.427 ↓ 45.8 366 1

Nested Loop (cost=1.57..97.27 rows=8 width=32) (actual time=0.191..1.427 rows=366 loops=1)

2. 0.023 0.318 ↓ 40.0 40 1

Nested Loop (cost=1.28..93.62 rows=1 width=24) (actual time=0.164..0.318 rows=40 loops=1)

3. 0.015 0.135 ↓ 40.0 40 1

Nested Loop (cost=0.85..92.16 rows=1 width=32) (actual time=0.100..0.135 rows=40 loops=1)

4. 0.064 0.064 ↑ 13.0 1 1

Index Scan using i_emp_user_id on employee emp (cost=0.42..14.05 rows=13 width=24) (actual time=0.064..0.064 rows=1 loops=1)

  • Index Cond: (user_id = 3397025)
5. 0.056 0.056 ↓ 3.1 40 1

Index Scan using idx_emp_dep_eid_del on department_employee dep (cost=0.42..5.88 rows=13 width=16) (actual time=0.031..0.056 rows=40 loops=1)

  • Index Cond: (employee_id = emp.id)
6. 0.160 0.160 ↑ 1.0 1 40

Index Only Scan using app_user_pkey on app_user au (cost=0.43..1.45 rows=1 width=8) (actual time=0.004..0.004 rows=1 loops=40)

  • Index Cond: (id = 3397025)
  • Heap Fetches: 0
7. 1.040 1.040 ↓ 1.5 9 40

Index Scan using department_position_dep_idx on department_position dp (cost=0.29..3.59 rows=6 width=16) (actual time=0.017..0.026 rows=9 loops=40)

  • Index Cond: (department_id = dep.department_id)
  • Filter: (deleted = 'N'::bpchar)
  • Rows Removed by Filter: 4