Re: partition queries hitting all partitions even though check key is specified

From: Josh Berkus <josh(at)agliodbs(dot)com>
To: Kevin Kempter <kevink(at)consistentstate(dot)com>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: partition queries hitting all partitions even though check key is specified
Date: 2010-07-13 03:01:08
Message-ID: 4C3BD6F4.4070802@agliodbs.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

On 9/2/09 10:05 AM, Kevin Kempter wrote:
> On Wednesday 02 September 2009 09:02:27 Scott Marlowe wrote:
>> On Wed, Sep 2, 2009 at 8:52 AM, Kevin Kempter<kevink(at)consistentstate(dot)com>
> wrote:
>>> Hi all;
>>>
>>> I cant figure out why we're scanning all of our partitions.

I don't think extract() is immutable, which would pretty much invalidate
your check constraints as far as CE is concerned.

I suggest feeding the actual numeric values to the check constraints.

--
-- Josh Berkus
PostgreSQL Experts Inc.
http://www.pgexperts.com

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Joshua D. Drake 2010-07-13 04:00:48 Re: partition queries hitting all partitions even though check key is specified
Previous Message phb07 2010-07-12 20:33:17 Re: Slow query with planner row strange estimation