Re: Another question about partitioning - Mailing list pgsql-general

From Gregory Stark
Subject Re: Another question about partitioning
Date
Msg-id 874pf79mtw.fsf@oxford.xeocode.com
Whole thread Raw
In response to Another question about partitioning  (Alex Vinogradovs <AVinogradovs@Clearpathnet.com>)
List pgsql-general
"Alex Vinogradovs" <AVinogradovs@Clearpathnet.com> writes:

> Hello all,
>
>
> I have a table which is partitioned by range into 10 pieces with
> constraint exceptions. Constraint exceptions is enabled in server
> configuration too. For some reason, queries to the master table
> are still slower than direct queries against partitions. Is there
> any real reason for that, or I should look into misconfiguration ?

Well you have to look at the actual plans. Having to combine multiple
partitions does have some cost to it and does interfere somewhat in the
planner's ability to optimize plans so it might not be a win on individual
queries if they were not doing big scans of unnecessary data previously.

You might also consider using partial indexes instead of partitioning if your
goal is just optimizing queries. The big advantage of partitioning is being
able to add and drop entire partitions effectively instantaneously.

--
  Gregory Stark
  EnterpriseDB          http://www.enterprisedb.com
  Ask me about EnterpriseDB's PostGIS support!

pgsql-general by date:

Previous
From: Ron Johnson
Date:
Subject: Re: Linux v.s. Mac OS-X Performance
Next
From: Greg Smith
Date:
Subject: Re: Linux v.s. Mac OS-X Performance