Answer the question
In order to leave comments, you need to log in
How to improve the performance of TrigramSimilarity?
There is a table with ~300 thousand records, Postgres DB. It is necessary to search the table with typos, for which I use TrigramSimilarity.
SomeModel.objects.annotate(sim=TrigramSimilarity('title', q)).filter(sim__gt=0.05).order_by("-sim")
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question