Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check if Trigram Indices are taken on searchfilter #458

Open
RudiThoeni opened this issue Oct 23, 2024 · 0 comments
Open

Check if Trigram Indices are taken on searchfilter #458

RudiThoeni opened this issue Oct 23, 2024 · 0 comments
Assignees

Comments

@RudiThoeni
Copy link
Member

Check if the queries are using the trigram indices

searching simple

explain analyze SELECT data FROM "smgpois" WHERE 
(data#>>'{Detail,de,Title}' LIKE '%rudi%')
LIMIT 10

with access role

explain analyze SELECT data FROM "smgpois" WHERE 
(data#>>'{Detail,de,Title}' LIKE '%rudi%')
AND 
(gen_access_role @> array['IDM']) 
LIMIT 10

searching trough each language

explain analyze SELECT data FROM "smgpois" WHERE 
(data#>>'{Detail,de,Title}' ILIKE '%rudi%' OR 
data#>>'{Detail,it,Title}' ILIKE '%rudi%' OR 
data#>>'{Detail,en,Title}' ILIKE '%rudi%' OR 
data#>>'{Detail,nl,Title}' ILIKE '%rudi%' OR 
data#>>'{Detail,cs,Title}' ILIKE '%rudi%' OR 
data#>>'{Detail,pl,Title}' ILIKE '%rudi%' OR 
data#>>'{Detail,fr,Title}' ILIKE '%rudi%' OR 
data#>>'{Detail,pl,Title}' ILIKE '%rudi%')
AND 
(gen_access_role @> array['IDM']) 
ORDER BY gen_shortname ASC LIMIT 10

with additional ID search

explain analyze SELECT data FROM "smgpois" WHERE 
(data#>>'{Detail,de,Title}' ILIKE '%rudi%' OR 
data#>>'{Detail,it,Title}' ILIKE '%rudi%' OR 
data#>>'{Detail,en,Title}' ILIKE '%rudi%' OR 
data#>>'{Detail,nl,Title}' ILIKE '%rudi%' OR 
data#>>'{Detail,cs,Title}' ILIKE '%rudi%' OR 
data#>>'{Detail,pl,Title}' ILIKE '%rudi%' OR 
data#>>'{Detail,fr,Title}' ILIKE '%rudi%' OR 
data#>>'{Detail,pl,Title}' ILIKE '%rudi%' OR 
data#>>'{Id}' ILIKE '%rudi%') AND 
(gen_access_role @> array['IDM']) ORDER BY 
gen_shortname ASC LIMIT 10
@RudiThoeni RudiThoeni self-assigned this Oct 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant