Skip site navigation (1) Skip section navigation (2)

partitioning question 1

From: Ben <midfield(at)gmail(dot)com>
To: pgsql-performance(at)postgresql(dot)org
Subject: partitioning question 1
Date: 2010-10-28 16:36:54
Message-ID: A9A748D8-A52F-4C16-A303-3A4AA1EC1BD2@gmail.com (view raw or flat)
Thread:
Lists: 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 query performance that a clustered index doesn't already give you -- the advantages are all in maintainability.  an index is able to eliminate pages just as well as constraint exclusion is able to eliminate table partitions.  the I/O advantages of having queries target small subtables are the same as the I/O advantages of clustering the index : result pages in 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 constraint exclusion only works with static constants in where clauses, and only works with simple operators like >, < which basically forces btree indexes when i want to use gist) it is indeed likely that partitioning can be slower than one big table with a clustered index.

is my intuition completely off on this?

best regards, ben

Responses

pgsql-performance by date

Next:From: Robert HaasDate: 2010-10-28 17:05:30
Subject: Re: how to get the total number of records in report
Previous:From: Robert HaasDate: 2010-10-28 16:21:01
Subject: Re: Query much faster with enable_seqscan=0

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group