How can I optimize a research on text field?

Поиск
Список
Период
Сортировка
От Jerome Knobl
Тема How can I optimize a research on text field?
Дата
Msg-id 3639DD8F.2CB99B94@mandanet.ch
обсуждение исходный текст
Ответы Re: [SQL] How can I optimize a research on text field?  (Mike Meyer <mwm@phone.net>)
Список pgsql-sql
Hello,

What index method can I use for a text field to have a better
optimisation.

I tried btree and hash method, but when I make a clause like : where nom
like '%PICASSO%'; the request don't use any index!?!

example:
mayer98=> explain select count(*) from artistes, oeuvres where
artistes.ref=oeuvres.refartiste and nom like '%PICASSO%';
NOTICE:  QUERY PLAN:

Aggregate  (cost=4894.04 size=0 width=0)
  ->  Nested Loop  (cost=4894.04 size=874 width=8)
        ->  Seq Scan on artistes  (cost=4837.37 size=1 width=4)
        ->  Index Scan on oeuvres  (cost=56.67 size=685510 width=4)

EXPLAIN

Jérôme Knöbl



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

Предыдущее
От: Petter Reinholdtsen
Дата:
Сообщение: Access rights to sequence.nextval?
Следующее
От: Mike Meyer
Дата:
Сообщение: Re: [SQL] How can I optimize a research on text field?