explain.depesz.com

PostgreSQL's explain analyze made readable

Result: qQbd

Settings
# exclusive inclusive rows x rows loops node
1. 0.000 0.000 ↓ 0.0

Limit (cost=0.97..67,265.63 rows=1 width=194) (actual rows= loops=)

2. 0.000 0.000 ↓ 0.0

Nested Loop (cost=0.97..67,265.63 rows=1 width=194) (actual rows= loops=)

  • Join Filter: (((dep_ath.company_cd)::text = (dep_inc_ath.company_cd)::text) AND ((dep_ath.department_cd)::text = (dep_inc_ath.department_cd)::text))
3. 0.000 0.000 ↓ 0.0

Nested Loop (cost=0.41..11.18 rows=1 width=218) (actual rows= loops=)

4. 0.000 0.000 ↓ 0.0

Seq Scan on imm_department_ath dep_ath (cost=0.00..2.74 rows=1 width=26) (actual rows= loops=)

  • Filter: ((company_cd)::text = (department_set_cd)::text)
5. 0.000 0.000 ↓ 0.0

Index Scan using imm_department_ix02 on imm_department dep (cost=0.41..8.43 rows=1 width=192) (actual rows= loops=)

  • Index Cond: (((company_cd)::text = (dep_ath.company_cd)::text) AND ((department_set_cd)::text = (dep_ath.company_cd)::text) AND ((department_cd)::text = (dep_ath.department_cd)::text))
  • Filter: ((company_cd)::text = (department_set_cd)::text)
6. 0.000 0.000 ↓ 0.0

Index Scan using imm_department_inc_ath_ix02 on imm_department_inc_ath dep_inc_ath (cost=0.56..67,254.42 rows=2 width=64) (actual rows= loops=)

  • Index Cond: (((company_cd)::text = (dep.company_cd)::text) AND ((department_cd)::text = (dep.department_cd)::text))
  • Filter: ((department_cd)::text = (parent_department_cd)::text)