explain.depesz.com

PostgreSQL's explain analyze made readable

Result: CDTZ

Settings
# exclusive inclusive rows x rows loops node
1. 209.861 5,920.241 ↑ 26.0 800 1

Gather (cost=20,000.43..83,123.74 rows=20,799 width=220) (actual time=4.378..5,920.241 rows=800 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
2. 0.073 5,710.380 ↑ 32.5 267 3 / 3

Result (cost=0.43..61,043.84 rows=8,666 width=220) (actual time=3,758.376..5,710.380 rows=267 loops=3)

  • One-Time Filter: ((current_setting('nimble.company_id'::text))::bytea = '\x4c2118ad54397f271b000000'::bytea)
3. 5,710.307 5,710.307 ↑ 32.5 267 3 / 3

Parallel Index Scan using contacts_pkey on contacts (cost=0.43..61,043.84 rows=8,666 width=220) (actual time=3,758.346..5,710.307 rows=267 loops=3)

  • Index Cond: (company_id = '\x4c2118ad54397f271b000000'::bytea)
  • Filter: (((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) OR ((string_to_array(current_setting('nimble.user_id'::text), ','::text))::bytea[] && edit_for_users) OR ((string_to_array(current_setting('nimble.group_ids'::text), ','::text))::bytea[] && edit_for_groups))
  • Rows Removed by Filter: 350,456
Planning time : 0.244 ms
Execution time : 5,920.355 ms