explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 8uV4

Settings
# exclusive inclusive rows x rows loops node
1. 9.373 266.871 ↑ 1.0 1 1

Aggregate (cost=52,915.41..52,915.42 rows=1 width=8) (actual time=266.871..266.871 rows=1 loops=1)

2. 257.498 257.498 ↓ 1.0 116,382 1

Index Scan using contacts_pkey on contacts (cost=0.44..52,624.66 rows=116,300 width=0) (actual time=0.018..257.498 rows=116,382 loops=1)

  • Index Cond: (company_id = (current_setting('nimble.company_id'::text))::bytea)
  • Filter: ((current_setting('nimble.view_all_contacts'::text))::boolean OR ((owner_id IS NOT NULL) AND (owner_id = (current_setting('nimble.user_id'::text))::bytea)) OR (read_for_users && '{""\\x00""}'::bytea[]) OR (read_for_users && ARRAY[(current_setting('nimble.user_id'::text))::bytea]) OR (read_for_groups && (string_to_array(current_setting('nimble.group_ids'::text), ','::text))::bytea[]) OR (edit_for_users && ARRAY[(current_setting('nimble.user_id'::text))::bytea]) OR (edit_for_groups && (string_to_array(current_setting('nimble.group_ids'::text), ','::text))::bytea[]))
Planning time : 0.336 ms
Execution time : 266.915 ms