Re: [PGSQL 8.3.5] Use of a partial indexes

Поиск
Список
Период
Сортировка
От Scott Marlowe
Тема Re: [PGSQL 8.3.5] Use of a partial indexes
Дата
Msg-id dcc563d10812290733i7bd5c1d5jc569a7a77137b74a@mail.gmail.com
обсуждение исходный текст
Ответ на Re: [PGSQL 8.3.5] Use of a partial indexes  (Reg Me Please <regmeplease@gmail.com>)
Список pgsql-general
On Mon, Dec 29, 2008 at 7:41 AM, Reg Me Please <regmeplease@gmail.com> wrote:
> Hi.
>
> The WHERE condition can be divided into a "slowly changing" part and in
> a "random" one. The random part is the one I change at every query to avoid
> result caching.
>
> The planner seems to be smart enough to "learn" while working but then
> I should see a change in the EXPLAIN output, which never happens.
>
> I also tried to restart PostgreSQL in order to force a cache flush, but
> again, once the new performances are in the don't get out!

I'm guessing that what happened is that when you created the partial
index, pgsql read the whole table in, and the OS cached it.
Subsequent accesses hit either pgsql's shared_buffers or the OS cache.

You could try unmounting and remounting the partition in addition to
restarting pgsql and see if that helps, or for sure, reboot.

Also, for the partial index to be chosen, it has to match pretty much
exactly the where clause.

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

Предыдущее
От: Reg Me Please
Дата:
Сообщение: Re: [PGSQL 8.3.5] Use of a partial indexes
Следующее
От: Scott Ribe
Дата:
Сообщение: Re: [PGSQL 8.3.5] Use of a partial indexes