explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 177m

Settings
# exclusive inclusive rows x rows loops node
1. 0.004 945.590 ↑ 1.0 1 1

Aggregate (cost=52,774.22..52,774.23 rows=1 width=8) (actual time=945.589..945.590 rows=1 loops=1)

2. 945.586 945.586 ↓ 0.0 0 1

Index Scan using contacts_pkey on contacts (cost=0.44..52,624.66 rows=59,824 width=0) (actual time=945.586..945.586 rows=0 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 = (current_setting('nimble.user_id'::text))::bytea) OR (read_for_users && '{""\\x5c783030""}'::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[]))
  • Rows Removed by Filter: 116,382
Planning time : 0.293 ms
Execution time : 945.670 ms