Re: Subquery flattening causing sequential scan

Поиск
Список
Период
Сортировка
От Robert Haas
Тема Re: Subquery flattening causing sequential scan
Дата
Msg-id CA+TgmoZ4ALwpPdGTpmya3xydYep5JKe38nbVGavyrg8ai5Sa5w@mail.gmail.com
обсуждение исходный текст
Ответ на Subquery flattening causing sequential scan  (Jim Crate <jimcfl@gmail.com>)
Список pgsql-performance
On Tue, Dec 27, 2011 at 12:29 PM, Jim Crate <jimcfl@gmail.com> wrote:
> My question is why does it do a seq scan when it flattens this subquery into a JOIN?  Is it because the emsg_messages
tableis around 1M rows?  Are there some guidelines to when the planner will prefer not to use an available index?  I
justhad a look through postgresql.conf and noticed that I forgot to set effective_cache_size to something reasonable
fora machine with 16GB of memory.  Would the default setting of 128MB cause this behavior?  I can't bounce the
productionserver midday to test that change. 

You wouldn't need to bounce the production server to test that.  You
could just use SET in the session you were testing from.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

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

Предыдущее
От: Jesper Krogh
Дата:
Сообщение: Re: Query planner doesn't use index scan on tsvector GIN index if LIMIT is specifiedQuery planner doesn't use index scan on tsvector GIN index if LIMIT is specified
Следующее
От: Robert Haas
Дата:
Сообщение: Re: partitioned table: differents plans, slow on some situations