Re: [GENERAL] Index greater than 8k

Поиск
Список
Период
Сортировка
От Teodor Sigaev
Тема Re: [GENERAL] Index greater than 8k
Дата
Msg-id 4548A08C.4060104@sigaev.ru
обсуждение исходный текст
Ответ на Re: [GENERAL] Index greater than 8k  ("Joshua D. Drake" <jd@commandprompt.com>)
Ответы Re: [GENERAL] Index greater than 8k  ("Joshua D. Drake" <jd@commandprompt.com>)
Re: [GENERAL] Index greater than 8k  ("Gregory Maxwell" <gmaxwell@gmail.com>)
Список pgsql-hackers
> We are trying to get something faster than ~ '%foo%';
> Which Tsearch2 does not give us :)

Hmm, why not with GIN? :) Although, right now GIN doesn't support prefix search,
it's possible to use it.

Brain storm method:

Develop a dictionary which returns all substring for lexeme, for example for
word foobar it will be 'foobar fooba foob foo fo oobar ooba oob oo obar oba ob
bar ba ar'. And make GIN functional index over your column (to save disk space).
So, your query will be looked as
select ... where to_tsvector(text_column) @@ 'foo';
Notices:
Time of search in GIN weak depend on number of words (opposite to
tsearch2/GiST), but insertion of row may be slow enough....

--
Teodor Sigaev                                   E-mail: teodor@sigaev.ru
                                                    WWW: http://www.sigaev.ru/

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

Предыдущее
От: "Simon Riggs"
Дата:
Сообщение: Re: Extended protocol logging
Следующее
От: "Joshua D. Drake"
Дата:
Сообщение: Re: [GENERAL] Index greater than 8k