От: Matthew Wakeling
Тема: Re: slow query
Дата: ,
Msg-id: alpine.DEB.2.00.1006040954200.4083@aragorn.flymine.org
(см: обсуждение, исходный текст)
Ответ на: slow query  (Anj Adu)
Ответы: Re: slow query  (Anj Adu)
Список: pgsql-performance

Скрыть дерево обсуждения

slow query  (Anj Adu, )
 Re: slow query  (, )
  Re: slow query  (Anj Adu, )
   Re: slow query  (Anj Adu, )
    Re: slow query  (Anj Adu, )
     Re: slow query  (Scott Marlowe, )
      Re: slow query  (Anj Adu, )
       Re: slow query  (Scott Marlowe, )
 Re: slow query  (Matthew Wakeling, )
  Re: slow query  (Anj Adu, )
 Re: slow query  (hubert depesz lubaczewski, )

On Thu, 3 Jun 2010, Anj Adu wrote:
> http://explain.depesz.com/s/kHa

I'm interested in why the two partitions dev4_act_dy_fact and
dev4_act_dy_fact_2010_05_t3 are treated so differently. I'm guessing that
the former is the parent and the latter the child table?

When accessing the parent table, Postgres is able to use a bitmap AND
index scan, because it has the two indexes dev4_act_dy_dm_nd_indx and
dev4_act_dy_dm_cd_indx. Do the child tables have a similar index setup?

Incidentally, you could get even better than a bitmap AND index scan by
creating an index on (node_id, thedate) on each table.

> random_page_cost=1

I agree with Tomas that this is rarely a useful setting.

Matthew

--
 You can configure Windows, but don't ask me how.       -- Bill Gates


В списке pgsql-performance по дате сообщения:

От: Michael Gould
Дата:
Сообщение: Re: Performance tuning for postgres
От: Bruce Momjian
Дата:
Сообщение: Re: Weird XFS WAL problem