partial index on a text field

Поиск
Список
Период
Сортировка
От Chris
Тема partial index on a text field
Дата
Msg-id 001901c4ba40$d064b270$0d00a8c0@chris
обсуждение исходный текст
Ответы Re: partial index on a text field  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-general
Hi all,

I have a text field which I'll be doing LIKE searches against so I
wanted to set up an index on it.

The data itself is too long to create a full index, so I can't just:

chris=> create index blah on ff_index(icontent);
ERROR:  index row requires 21216 bytes, maximum size is 8191

So I thought I'd set up an index to use the first say 200 chars of the
string

chris=> create index blah on ff_index(substring(icontent, 0, 200));
ERROR:  syntax error at or near "(" at character 40

I've tried many variations of this, same result.

I know I can create a partial index on it if the field is less than 200
chars, but that doesn't help me.

I'm running v7.4.5.

Any suggestions ?

Thanks,
Chris.


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

Предыдущее
От: Ken Tozier
Дата:
Сообщение: Re: Importing a tab delimited text file - How?
Следующее
От: Tom Lane
Дата:
Сообщение: Re: partial index on a text field