partitioning question 1 - Mailing list pgsql-performance

From Ben
Subject partitioning question 1
Date
Msg-id A9A748D8-A52F-4C16-A303-3A4AA1EC1BD2@gmail.com
Whole thread Raw
Responses Re: partitioning question 1
Re: partitioning question 1
List pgsql-performance
hello --

my last email was apparently too long to respond to so i'll split it up into shorter pieces.  my first question :

my understanding of how range partitioning and constraint exclusion works leads me to believe that it does not buy any
queryperformance that a clustered index doesn't already give you -- the advantages are all in maintainability.  an
indexis able to eliminate pages just as well as constraint exclusion is able to eliminate table partitions.  the I/O
advantagesof having queries target small subtables are the same as the I/O advantages of clustering the index : result
pagesin a small range are very close to each other on disk. 

finally, since constraint exclusion isn't as flexible as indexing (i've seen old mailing list posts that say that
constraintexclusion only works with static constants in where clauses, and only works with simple operators like >, <
whichbasically forces btree indexes when i want to use gist) it is indeed likely that partitioning can be slower than
onebig table with a clustered index. 

is my intuition completely off on this?

best regards, ben

pgsql-performance by date:

Previous
From: Robert Haas
Date:
Subject: Re: Query much faster with enable_seqscan=0
Next
From: Robert Haas
Date:
Subject: Re: how to get the total number of records in report