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

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: jd(at)commandprompt(dot)com
Cc: Kevin Kempter <kevink(at)consistentstate(dot)com>, pgsql-performance(at)postgresql(dot)org
Subject: Re: partition queries hitting all partitions even though check key is specified
Date: 2009-09-02 17:23:06
Message-ID: 13061.1251912186@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

"Joshua D. Drake" <jd(at)commandprompt(dot)com> writes:
> As far as I know constraint exclusion doesn't work with date_part or
> extract().

Uh, you clipped the example in my message showing that it does,
at least in the particular case Kevin showed us.

There are some variants of date_part that aren't immutable, but timestamp
without tz isn't one of them.

Still, I agree that not depending on it would be better.

regards, tom lane

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Tom Lane 2009-09-02 18:22:34 Re: partition queries hitting all partitions even though check key is specified
Previous Message Joshua D. Drake 2009-09-02 15:59:01 Re: partition queries hitting all partitions even though check key is specified