explain.depesz.com

PostgreSQL's explain analyze made readable

Result: ESs5

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

HashAggregate (cost=34,847.60..35,080.75 rows=16,956 width=60) (actual rows= loops=)

  • Output: si.id, si.permo_type, (CASE WHEN (si.permo_type = ANY ('{file,folder,deal}'::text[])) THEN 'foo'::text ELSE 'bar'::text END), si.display_name
  • Group Key: si.id, si.permo_type, CASE WHEN (si.permo_type = ANY ('{file,folder,deal}'::text[])) THEN 'foo'::text ELSE 'bar'::text END, si.display_name
2. 0.000 0.000 ↓ 0.0

Hash Right Join (cost=12,389.04..34,678.04 rows=16,956 width=60) (actual rows= loops=)

  • Output: si.id, si.permo_type, CASE WHEN (si.permo_type = ANY ('{file,folder,deal}'::text[])) THEN 'foo'::text ELSE 'bar'::text END, si.display_name
  • Inner Unique: true
  • Hash Cond: (sis.system_item_id = si.id)
  • Filter: (((sis.visibility IS NULL) OR (sis.visibility = 'visible'::text)) AND ((si.permo_type <> 'file'::text) OR ((si.permo_type = 'folder'::text) AND (sis.parent_system_item_id = 65,081))) AND ((si.permo_type <> 'deal'::text) OR ((si.permo_type = 'folder'::text) AND (sis.item_id_owner = 5))))
3. 0.000 0.000 ↓ 0.0

Seq Scan on public.system_item_statuses sis (cost=0.00..21,511.31 rows=272,031 width=21) (actual rows= loops=)

  • Output: sis.system_item_id, sis.visibility, sis.parent_system_item_id, sis.item_id_owner
4. 0.000 0.000 ↓ 0.0

Hash (cost=11,847.20..11,847.20 rows=43,347 width=28) (actual rows= loops=)

  • Output: si.id, si.permo_type, si.display_name
5. 0.000 0.000 ↓ 0.0

Bitmap Heap Scan on public.system_items si (cost=1,960.36..11,847.20 rows=43,347 width=28) (actual rows= loops=)

  • Output: si.id, si.permo_type, si.display_name
  • Recheck Cond: (si.permo_type = 'deal'::text)
  • Filter: (NOT si.deleted)
6. 0.000 0.000 ↓ 0.0

Bitmap Index Scan on system_items_permo_type_permo_id (cost=0.00..1,949.52 rows=43,347 width=0) (actual rows= loops=)

  • Index Cond: (si.permo_type = 'deal'::text)