explain.depesz.com

PostgreSQL's explain analyze made readable

Result: XgbG

Settings
# exclusive inclusive rows x rows loops node
1. 0.005 6,785.248 ↓ 2.0 2 1

Nested Loop (cost=5.28..202.57 rows=1 width=89) (actual time=6,716.565..6,785.248 rows=2 loops=1)

2. 0.187 6,785.163 ↓ 2.0 2 1

Nested Loop (cost=4.86..198.13 rows=1 width=97) (actual time=6,716.486..6,785.163 rows=2 loops=1)

3. 0.028 33.307 ↑ 2.1 17 1

Nested Loop (cost=4.71..168.40 rows=36 width=134) (actual time=0.111..33.307 rows=17 loops=1)

4. 32.221 32.221 ↑ 1.0 1 1

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

  • Filter: ((sysname)::text = 'department'::text)
  • Rows Removed by Filter: 102
5. 1.034 1.058 ↑ 2.6 17 1

Bitmap Heap Scan on workareas ancestor (cost=4.71..163.68 rows=44 width=138) (actual time=0.065..1.058 rows=17 loops=1)

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

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

  • Index Cond: (type = workareatypes.id)
7. 6,751.669 6,751.669 ↓ 0.0 0 17

Index Scan using workareas_tree_idx on workareas (cost=0.15..0.82 rows=1 width=53) (actual time=395.040..397.157 rows=0 loops=17)

  • Index Cond: (ancestor.tree @> tree)
  • Filter: (COALESCE(branch, organization) = 13493)
  • Rows Removed by Filter: 273
8. 0.080 0.080 ↑ 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.039..0.040 rows=1 loops=2)

  • Index Cond: (id = 13493)
  • Heap Fetches: 0
Planning time : 334.918 ms
Execution time : 6,785.637 ms