jeudi 13 avril 2023

Pattern index not getting used in my postgres query

My query is

SELECT * 
FROM all_persons
WHERE ((("email") ilike ('abc.com%')))
ORDER BY "lastOrderAt" DESC
OFFSET 0 LIMIT 20

I have already added indexes on table on column emailvarchar_pattern_ops.

Using explain I found that index is not used. Can someone guide that is the index wrongly created or how can I speed up the query?

Aucun commentaire:

Enregistrer un commentaire