explain.depesz.com

PostgreSQL's explain analyze made readable

Result: y7ro

Settings
# exclusive inclusive rows x rows loops node
1. 6,005.280 6,136.761 ↓ 0.0 0 1

Bitmap Heap Scan on contacts (cost=8,452.86..96,710.78 rows=530,861 width=220) (actual time=6,136.760..6,136.761 rows=0 loops=1)

  • Recheck Cond: (company_id = '\x4c2118ad54397f271b000000'::bytea)
  • Filter: ((current_setting('nimble.see_all_contacts'::text))::boolean OR ((company_id = (current_setting('nimble.company_id'::text))::bytea) AND ((owner_id = (current_setting('nimble.user_id'::text))::bytea) OR ((string_to_array(current_setting('nimble.user_id'::text), ','::text))::bytea[] && read_for_users) OR ((string_to_array(current_setting('nimble.group_ids'::text), ','::text))::bytea[] && read_for_groups))))
  • Rows Removed by Filter: 1,052,168
  • Heap Blocks: exact=18,009
2. 131.481 131.481 ↑ 1.0 1,052,168 1

Bitmap Index Scan on ix_rls_permissions (cost=0.00..8,320.14 rows=1,052,445 width=0) (actual time=131.481..131.481 rows=1,052,168 loops=1)

  • Index Cond: (company_id = '\x4c2118ad54397f271b000000'::bytea)
Planning time : 0.700 ms
Execution time : 6,137.384 ms