Indexes with LIKE

Поиск
Список
Период
Сортировка
От Julian Scarfe
Тема Indexes with LIKE
Дата
Msg-id 000901c22a53$206e0ad0$0500a8c0@Wilbur
обсуждение исходный текст
Ответы Re: Indexes with LIKE
Список pgsql-sql
I've noticed a difference in behaviour between a server running version 6.x
and one running 7.2.1 in use of indexes with LIKE.

With an index on foo,

WHERE foo LIKE 'bar%'

uses the index (as I would expect it to) on the 6.x box, but uses a
sequential scan (really slow) on the 7.2.1 box.
It's possible that I've set (or failed to set)  a run-time parameter that
controls the behaviour, but I don't know what that might be. ANALYZEing the
table doesn't modify the behaviour.

I can't find any mention of this in the documentation -- any pointers would
be appreciated.

If the above doesn't ring any bells, I'll put together an example.

Many thanks

Julian Scarfe




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

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: Query kill
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: pg_restore cannot restore index