Skip to content
This repository has been archived by the owner on May 22, 2021. It is now read-only.

As a User I'd like to have faster search time without modifiers #55

Open
alexander-myltsev opened this issue Jan 10, 2018 · 0 comments
Open

Comments

@alexander-myltsev
Copy link
Contributor

The query is too slow since does not use an index:

$ explain select "id", "name", "canonical_uuid", "canonical", "surrogate", "canonical_ranked" from "name_strings" where (unaccent("name") =
 unaccent('Homo sapiens')) or ((not ("canonical_uuid" = 'a9456e61-bd30-53bc-8588-accb913cc64a')) and (unaccent("canonical") = unaccent('Homo sapien
s'))) limit 10;

Limit  (cost=0.00..42.65 rows=10 width=120)
   ->  Seq Scan on name_strings  (cost=0.00..1138735.97 rows=267008 width=120)
         Filter: ((unaccent((name)::text) = unaccent('Homo sapiens'::text)) OR ((canonical_uuid <> 'a9456e61-bd30-53bc-8588-accb913cc64a'::uuid) AND (unaccent((canonical)::text) = unaccent('Homo sapiens'::text))))
(3 rows)
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant