Unix Technical Forum

Re: Enabling constraint_exclusion does not avoid scanning all child partitions

This is a discussion on Re: Enabling constraint_exclusion does not avoid scanning all child partitions within the Pgsql Performance forums, part of the PostgreSQL category; --> Your point solved my problem. Thank you -Fayza On 12/4/06, Tom Lane <tgl@sss.pgh.pa.us> wrote: > > "Fayza Sultan" <fayza.sultan@gmail.com> ...


Go Back   Unix Technical Forum > Database Server Software > PostgreSQL > Pgsql Performance

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-19-2008, 09:49 AM
Fayza Sultan
 
Posts: n/a
Default Re: Enabling constraint_exclusion does not avoid scanning all child partitions

Your point solved my problem.

Thank you

-Fayza


On 12/4/06, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>
> "Fayza Sultan" <fayza.sultan@gmail.com> writes:
> > CREATE TABLE parent (
> > monthdate date NOT NULL,
> > id int4 NOT NULL,
> > CONSTRAINT parent_idx PRIMARY KEY (monthdate,id )
> > );

>
> > CREATE TABLE child1
> > (
> > CONSTRAINT child1_idx PRIMARY KEY (monthdate,id),
> > CONSTRAINT child1_chk CHECK (monthdate >= '2006-01-01

> 00:00:00'::timestamp
> > without time zone AND monthdate < '2006-02-01 00:00:00'::timestamp

> without
> > time zone)

>
> monthdate is date, not timestamp. See the caveat in the documentation
> about avoiding cross-type comparisons when formulating constraints for
> constraint exclusion to use.
>
> regards, tom lane
>


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 04:56 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
www.UnixAdminTalk.com