explain.depesz.com

PostgreSQL's explain analyze made readable

Result: Aycq

Settings
# exclusive inclusive rows x rows loops node
1. 0.000 808.425 ↑ 1.0 1 1

Finalize Aggregate (cost=103,220.62..103,220.63 rows=1 width=8) (actual time=808.424..808.425 rows=1 loops=1)

2. 407.352 862.885 ↓ 1.5 3 1

Gather (cost=103,220.41..103,220.62 rows=2 width=8) (actual time=804.593..862.885 rows=3 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
3. 44.944 455.533 ↑ 1.0 1 3 / 3

Partial Aggregate (cost=83,220.41..83,220.42 rows=1 width=8) (actual time=455.533..455.533 rows=1 loops=3)

4. 343.390 410.589 ↑ 1.2 350,056 3 / 3

Parallel Bitmap Heap Scan on contacts (cost=8,736.82..82,127.72 rows=437,077 width=0) (actual time=68.646..410.589 rows=350,056 loops=3)

  • 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: 667
  • Heap Blocks: exact=8,487
5. 67.199 67.199 ↓ 1.0 1,060,045 1 / 3

Bitmap Index Scan on ix_rls_permissions (cost=0.00..8,474.58 rows=1,048,984 width=0) (actual time=201.597..201.598 rows=1,060,045 loops=1)

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