Re: pg_trgm performance

Поиск
Список
Период
Сортировка
От Guillaume Smet
Тема Re: pg_trgm performance
Дата
Msg-id 1d4e0c10702231509k7ad24e2ck3a149a2e3a2899f7@mail.gmail.com
обсуждение исходный текст
Ответ на Re: pg_trgm performance  ("Steinar H. Gunderson" <sgunderson@bigfoot.com>)
Ответы Re: pg_trgm performance  ("Steinar H. Gunderson" <sgunderson@bigfoot.com>)
Список pgsql-performance
Florian, Steinar,

Could you try to see if the GIN implementation of pg_trgm is faster in
your cases?

Florian, instead of using WHERE similarity(...) > 0.4, you should use
set_limit (SELECT set_limit(0.4);).

I posted it on -patches and it is available here:
http://people.openwide.fr/~gsmet/postgresql/pg_trgm_gin3.diff .

The patch is against HEAD but It applies on 8.2 without any problem.

After applying this patch and installing pg_trgm.sql (you should
uninstall pg_trgm before compiling using the old uninstall script),
then you can create:
CREATE INDEX idx_table_word ON table USING gin(word gin_trgm_ops);

17 characters is quite long so I'm not sure it will help you because
it usually has to recheck a high number of rows due to the GIN
implementation but I'd like to know if it's faster or slower in this
case.

If your data are not private and you don't have the time to test it, I
can test it here without any problem.

Thanks.

--
Guillaume

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

Предыдущее
От: "Jim C. Nasby"
Дата:
Сообщение: Re: long checkpoint_timeout
Следующее
От: "Steinar H. Gunderson"
Дата:
Сообщение: Re: pg_trgm performance