Re: indexing large "text" attributes ... ERROR: maximum size is 8191

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: indexing large "text" attributes ... ERROR: maximum size is 8191
Дата
Msg-id 9164.1186367826@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: indexing large "text" attributes ... ERROR: maximum size is 8191  (Benjamin Arai <me@benjaminarai.com>)
Список pgsql-general
Benjamin Arai <me@benjaminarai.com> writes:
> The tsearch2 webpage says to do something like

>          SELECT intindex, strTopic FROM tblmessages
>                  WHERE idxfti @@ to_tsquery('default', 'gettysburg &
> address')
>                  AND strMessage ~* '.*men are created equal.*';
>           intindex |           strtopic
>          ----------+------------------------------
>                  6 | Gettysburg address quotation
>          (1 row)

Right.

> Which would mean I would have to create index on strMessage.  Right?

Wrong.  A btree index on strMessage is utterly worthless for checking
that pattern match, and even if it did work, there's no point in using
a second index to check it rather than fetching the heap entry.

            regards, tom lane

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

Предыдущее
От: Benjamin Arai
Дата:
Сообщение: Re: indexing large "text" attributes ... ERROR: maximum size is 8191
Следующее
От: hanasaki
Дата:
Сообщение: Re: HA, failover and load balancing / howto?