explain.depesz.com

PostgreSQL's explain analyze made readable

Result: hWqH

Settings
# exclusive inclusive rows x rows loops node
1. 0.010 256.338 ↑ 1.0 30 1

Limit (cost=3,943.85..3,993.89 rows=30 width=13) (actual time=242.306..256.338 rows=30 loops=1)

2. 0.077 256.328 ↑ 78.1 30 1

Nested Loop (cost=3,943.85..7,853.75 rows=2,344 width=13) (actual time=242.306..256.328 rows=30 loops=1)

3. 0.041 241.581 ↑ 90.7 30 1

Unique (cost=3,943.43..3,963.85 rows=2,720 width=30) (actual time=241.529..241.581 rows=30 loops=1)

4. 2.444 241.540 ↑ 90.8 30 1

Sort (cost=3,943.43..3,950.23 rows=2,723 width=30) (actual time=241.528..241.540 rows=30 loops=1)

  • Sort Key: contacts_values.id, (ts_rank(to_tsvector('suggestions'::regconfig, translate(regexp_replace(contacts_values.value, '(?<=[a-z])(?=[A-Z])|(?<=[A-Z])(?=[A-Z][a-z])'::text, ' '::text, 'g'::text), '\@.:/+<>^&''()*!|'::text, '------'::text)), '''jon'''::tsquery, 1))
  • Sort Method: quicksort Memory: 160kB
5. 239.096 239.096 ↑ 1.9 1,423 1

Index Scan using ft_ix_contacts_values_field_value on contacts_values (cost=0.42..3,788.07 rows=2,723 width=30) (actual time=1.976..239.096 rows=1,423 loops=1)

  • Index Cond: ((company_id = '\x4c2118ad54397f271b000000'::bytea) AND (field_name = 'first_name'::text) AND (field_id = '\x000000000000000000000000'::bytea) AND (to_tsvector('suggestions'::regconfig, translate(regexp_replace(value, '(?<=[a-z])(?=[A-Z])|(?<=[A-Z])(?=[A-Z][a-z])'::text, ' '::text, 'g'::text), '\@.:/+<>^&''()*!|'::text, '------'::text)) @@ '''jon'''::tsquery))
  • Filter: (id IS NOT NULL)
6. 14.670 14.670 ↑ 1.0 1 30

Index Only Scan using contacts_pkey on contacts (cost=0.43..1.42 rows=1 width=26) (actual time=0.489..0.489 rows=1 loops=30)

  • Index Cond: ((company_id = '\x4c2118ad54397f271b000000'::bytea) AND (id = contacts_values.id))
  • Heap Fetches: 0
Planning time : 6.325 ms
Execution time : 256.429 ms