Re: slow query - Mailing list pgsql-performance

From Anj Adu
Subject Re: slow query
Date
Msg-id AANLkTikqPktNEIFMB6lNm7vjYVxtatWNSBJlGC3N_WTb@mail.gmail.com
Whole thread Raw
In response to Re: slow query  (Matthew Wakeling <matthew@flymine.org>)
List pgsql-performance
 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?

Yes..you are correct.
>
> 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?

Yes..the child table have indexes on those fields as well

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

Will this perform better than separate indexes ?

>
>> 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 by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: Weird XFS WAL problem
Next
From: Anj Adu
Date:
Subject: Re: slow query