explain.depesz.com

PostgreSQL's explain analyze made readable

Result: RaUV

Settings
# exclusive inclusive rows x rows loops node
1. 0.005 9,302.673 ↑ 1.0 30 1

Limit (cost=305,233.09..305,233.17 rows=30 width=17) (actual time=9,302.669..9,302.673 rows=30 loops=1)

2. 3.165 9,302.668 ↑ 153.5 30 1

Sort (cost=305,233.09..305,244.61 rows=4,606 width=17) (actual time=9,302.668..9,302.668 rows=30 loops=1)

  • Sort Key: (ts_rank(to_tsvector('suggestions'::regconfig, translate(regexp_replace(contacts__aggregated.value, '(?<=[a-z])(?=[A-Z])|(?<=[A-Z])(?=[A-Z][a-z])'::text, ' '::text, 'g'::text), '\@.:/+<>^&''()*!|'::text, '------'::text)), '''jon'''::tsquery, 1)) DESC
  • Sort Method: top-N heapsort Memory: 27kB
3. 31.762 9,299.503 ↑ 3.0 1,523 1

Nested Loop (cost=0.43..305,097.06 rows=4,606 width=17) (actual time=9.969..9,299.503 rows=1,523 loops=1)

4. 8,958.572 8,958.572 ↑ 3.5 1,523 1

Seq Scan on contacts__aggregated (cost=0.00..296,881.27 rows=5,262 width=40) (actual time=9.488..8,958.572 rows=1,523 loops=1)

  • Filter: ((field_name = 'names'::text) AND (company_id = '\x4c2118ad54397f271b000000'::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))
  • Rows Removed by Filter: 1042361
5. 309.169 309.169 ↑ 1.0 1 1,523

Index Only Scan using contacts_pkey on contacts (cost=0.43..1.34 rows=1 width=26) (actual time=0.203..0.203 rows=1 loops=1,523)

  • Index Cond: ((company_id = '\x4c2118ad54397f271b000000'::bytea) AND (id = contacts__aggregated.contact_id))
  • Heap Fetches: 125
Planning time : 0.692 ms
Execution time : 9,302.731 ms