Re: [pg_trgm] Making similarity(?, ?) < ? use an index

Поиск
Список
Период
Сортировка
От Greg Navis
Тема Re: [pg_trgm] Making similarity(?, ?) < ? use an index
Дата
Msg-id CAA6WWt-KsLcxnm+PS6WmB4muJeWHL245GsusXgow0j1hJMQRRQ@mail.gmail.com
обсуждение исходный текст
Ответ на Re: [pg_trgm] Making similarity(?, ?) < ? use an index  (Jeff Janes <jeff.janes@gmail.com>)
Ответы Re: [pg_trgm] Making similarity(?, ?) < ? use an index  (Jeff Janes <jeff.janes@gmail.com>)
Список pgsql-general
Thanks for your replies.

Sorry for confusion. Instead of `similarity(lhs, rhs) >= show_limit()`, which of course is completely equivalent to `lhs % rhs`, I wanted to write `similarity(lhs, rhs) >= my_custom_threshold`. It seems that the approach with ternary operators is quite a bit of work. I might have a simpler idea:

pg_trgm also provides `<->` but it seems this operator doesn't use indexes either. It seems the shortest path to per-query thresholds, without compromising the design, is making this operator use the index. Please help me understand whether my reasoning is correct. If it is, I'd appreciate a high-level overview of what needs to be done. I can block a few hours to work on this in the upcoming weeks.

Best regards
-- 
Greg Navis
I help tech companies to scale Heroku-hosted Rails apps.

В списке pgsql-general по дате отправления:

Предыдущее
От: rverghese
Дата:
Сообщение: Re: Partitioned postgres tables don't need update trigger??
Следующее
От: Andrew Beverley
Дата:
Сообщение: Actual rows significantly more than estimated during many joins