explain.depesz.com

PostgreSQL's explain analyze made readable

Result: R4dh

Settings
# exclusive inclusive rows x rows loops node
1. 507.299 599.087 ↓ 1.0 1,051,968 1

Bitmap Heap Scan on contacts (cost=8,600.44..156,876.64 rows=1,050,973 width=240) (actual time=94.525..599.087 rows=1,051,968 loops=1)

  • Recheck Cond: (company_id = '\x4c2118ad54397f271b000000'::bytea)
  • Filter: ((read_for_users IS NULL) OR (((string_to_array(current_setting('nimble.user_id'::text), ','::text))::bytea[] && read_for_users) AND (company_id = (current_setting('nimble.company_id'::text))::bytea)) OR (read_for_groups IS NULL) OR (((string_to_array(current_setting('nimble.group_ids'::text), ','::text))::bytea[] && read_for_groups) AND (company_id = (current_setting('nimble.company_id'::text))::bytea)) OR ((owner_id = (current_setting('nimble.user_id'::text))::bytea) AND (company_id = (current_setting('nimble.company_id'::text))::bytea)) OR (edit_for_users IS NULL) OR (((string_to_array(current_setting('nimble.user_id'::text), ','::text))::bytea[] && edit_for_users) AND (company_id = (current_setting('nimble.company_id'::text))::bytea)) OR (edit_for_groups IS NULL) OR (((string_to_array(current_setting('nimble.group_ids'::text), ','::text))::bytea[] && edit_for_groups) AND (company_id = (current_setting('nimble.company_id'::text))::bytea)))
  • Rows Removed by Filter: 200
  • Heap Blocks: exact=17,822
2. 91.788 91.788 ↓ 1.0 1,054,566 1

Bitmap Index Scan on ix_rls_permissions (cost=0.00..8,337.70 rows=1,050,973 width=0) (actual time=91.788..91.788 rows=1,054,566 loops=1)

  • Index Cond: (company_id = '\x4c2118ad54397f271b000000'::bytea)
Planning time : 0.431 ms
Execution time : 619.082 ms