Re: indexes in partitioned tables - again - Mailing list pgsql-performance

From Robert Haas
Subject Re: indexes in partitioned tables - again
Date
Msg-id m2m603c8f071004071413w1f2d2497hbbe07d9c6491848f@mail.gmail.com
Whole thread Raw
In response to indexes in partitioned tables - again  (Samuel Gendler <sgendler@ideasculptor.com>)
Responses Occasional giant spikes in CPU load
List pgsql-performance
On Tue, Apr 6, 2010 at 5:37 PM, Samuel Gendler
<sgendler@ideasculptor.com> wrote:
> In part, I'm surprised that the index scan takes as long as it does,
> since I'd think an index would be able to return the set of keys
> relatively quickly.  But that's a secondary issue.

We don't actually have a facility built into the index-scan machinery
to scan for distinct keys.  It's doing a full scan of the index and
then unique-ifying the results afterward.  It produces the right
answers, but it's definitely not as fast as it could be.

The planner is not as smart about partitioned tables as it could be,
either.  A scan of the partitioned tables is implemented as an append
node with one member per partition; and the planner isn't very good at
pushing things down through append nodes.

...Robert

pgsql-performance by date:

Previous
From: Robert Haas
Date:
Subject: Re: query slow; strace output worrisome
Next
From: Craig James
Date:
Subject: Occasional giant spikes in CPU load