Re: Difference in query plan

Поиск
Список
Период
Сортировка
От Richard Huxton
Тема Re: Difference in query plan
Дата
Msg-id 491DB1E9.6030500@archonet.com
обсуждение исходный текст
Ответ на Re: Difference in query plan  (Patrice Beliveau <pbeliveau@avior.ca>)
Список pgsql-performance
Patrice Beliveau wrote:
> Thanks,
>
> I'm already doing a vacuum full every night on all database, but the
> REINDEX fix it and now it's working fine

Are you sure it was the REINDEX? The plan was using a sequential scan.

> But this raise a question
>
> 1) This table is cleared every night and recomputed, does this mean that
> I should REINDEX every night also

Looks like you should. Or drop the indexes, load the data, re-create the
indexes, that can be quicker.

> 2) Why this thing didn't happen in the other schema

Have you re-loaded schema1 more often? It might even be the particular
order that rows are loaded - a btree can become "unbalanced" sometimes.

--
  Richard Huxton
  Archonet Ltd

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

Предыдущее
От: Patrice Beliveau
Дата:
Сообщение: Re: Difference in query plan
Следующее
От: "Віталій Тимчишин"
Дата:
Сообщение: Re: PostgreSQL OR performance