Re: Issue for partitioning with extra check constriants - Mailing list pgsql-performance

From Josh Berkus
Subject Re: Issue for partitioning with extra check constriants
Date
Msg-id 4CAA1E1B.8080505@agliodbs.com
Whole thread Raw
In response to Re: Issue for partitioning with extra check constriants  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Issue for partitioning with extra check constriants  ("Joshua D. Drake" <jd@commandprompt.com>)
Re: Issue for partitioning with extra check constriants  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: Issue for partitioning with extra check constriants  ("Joshua D. Drake" <jd@commandprompt.com>)
List pgsql-performance
> And your point is?  The design center for the current setup is maybe 5
> or 10 partitions.  We didn't intend it to be used for more partitions
> than you might have spindles to spread the data across.

Where did that come from?  It certainly wasn't anywhere when the feature
was introduced.  Simon intended for this version of partitioning to
scale to 100-200 partitions (and it does, provided that you dump all
other table constraints), and partitioning has nothing to do with
spindles.  I think you're getting it mixed up with tablespaces.

The main reason for partitioning is ease of maintenance (VACUUM,
dropping partitions, etc.) not any kind of I/O optimization.

I'd like to add the following statement to our docs on partitioning, in
section 5.9.4:

=====

Constraint exclusion is tested for every CHECK constraint on the
partitions, even CHECK constraints which have nothing to do with the
partitioning scheme.  This can add siginficant extra planner time,
especially if your partitions have CHECK constraints which are costly to
evaluate.  For performance, it can be a good idea to eliminate all extra
CHECK constraints on partitions or to re-implement them as triggers.

=====

>In case you haven't noticed, we have very finite
> amounts of manpower that's competent to do planner surgery.

Point.


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

pgsql-performance by date:

Previous
From: Hakan Kocaman
Date:
Subject: MIT benchmarks pgsql multicore (up to 48)performance
Next
From: "Joshua D. Drake"
Date:
Subject: Re: Issue for partitioning with extra check constriants