explain.depesz.com

PostgreSQL's explain analyze made readable

Result: mGTq

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=)

  • 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=)

  • 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 system_item_statuses sis (cost=0.00..21,511.31 rows=272,031 width=21) (actual rows= loops=)

4. 0.000 0.000 ↓ 0.0

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

5. 0.000 0.000 ↓ 0.0

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

  • Recheck Cond: (permo_type = 'deal'::text)
  • Filter: (NOT 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: (permo_type = 'deal'::text)