explain.depesz.com

PostgreSQL's explain analyze made readable

Result: ymxm

Settings
# exclusive inclusive rows x rows loops node
1. 0.000 6.456 ↓ 2.0 2 1

Nested Loop (cost=9.42..711.61 rows=1 width=89) (actual time=6.409..6.456 rows=2 loops=1)

2.          

Initplan (for Nested Loop)

3. 0.053 0.053 ↑ 1.0 1 1

Seq Scan on workareatypes (cost=0.00..4.29 rows=1 width=4) (actual time=0.026..0.053 rows=1 loops=1)

  • Filter: ((sysname)::text = 'department'::text)
  • Rows Removed by Filter: 102
4. 0.056 6.403 ↓ 2.0 2 1

Nested Loop (cost=4.71..702.88 rows=1 width=97) (actual time=6.360..6.403 rows=2 loops=1)

  • Join Filter: (ancestor.tree @> workareas.tree)
  • Rows Removed by Join Filter: 32
5. 0.064 0.159 ↑ 2.6 17 1

Bitmap Heap Scan on workareas ancestor (cost=4.71..163.68 rows=44 width=134) (actual time=0.133..0.159 rows=17 loops=1)

  • Recheck Cond: (type = $0)
  • Filter: visible
  • Rows Removed by Filter: 14
  • Heap Blocks: exact=24
6. 0.095 0.095 ↑ 1.8 31 1

Bitmap Index Scan on workareas_type_idx (cost=0.00..4.70 rows=56 width=0) (actual time=0.095..0.095 rows=31 loops=1)

  • Index Cond: (type = $0)
7. 0.014 6.188 ↑ 12.0 2 17

Materialize (cost=0.00..523.42 rows=24 width=53) (actual time=0.013..0.364 rows=2 loops=17)

8. 6.174 6.174 ↑ 12.0 2 1

Seq Scan on workareas (cost=0.00..523.30 rows=24 width=53) (actual time=0.214..6.174 rows=2 loops=1)

  • Filter: (COALESCE(branch, organization) = 13493)
  • Rows Removed by Filter: 4693
9. 0.050 0.050 ↑ 1.0 1 2

Index Only Scan using juridical_entities_pkey on juridical_entities (cost=0.42..4.44 rows=1 width=4) (actual time=0.025..0.025 rows=1 loops=2)

  • Index Cond: (id = 13493)
  • Heap Fetches: 0
Planning time : 0.821 ms
Execution time : 6.614 ms