From: Tom Lane <tgl@sss.pgh.pa.us>
To: John Papandriopoulos <dr.jpap@gmail.com>
Cc: pgsql-performance@postgresql.org
Subject: Re: Query-plan for partitioned UPDATE/DELETE slow and swaps vmem compared to SELECT
Date: Sat, 04 Dec 2010 01:20:54 -0500
Message-ID: <14012.1291443654@sss.pgh.pa.us> (raw)
In-Reply-To: <idbo6g$92r$1@news.hub.org>
References: <idbo6g$92r$1@news.hub.org>
John Papandriopoulos <dr.jpap@gmail.com> writes:
> I've found that a k-ary table inheritance tree works quite well to
> reduce the O(n) CHECK constraint overhead [1] in the query planner
> when enabling partition constraint exclusion.
Um ... you mean you're creating intermediate child tables for no reason
except to reduce the number of direct descendants of any one table?
That's an utter waste of time, because the first thing the planner will
do with an inheritance tree is flatten it. Just create *one* parent
table and make all the leaf tables direct children of it.
> My machine swaps wildly when PostgreSQL plans an UPDATE or DELETE.
This is a strong hint that you've got way too many child tables.
regards, tom lane
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-performance@postgresql.org
Cc: tgl@sss.pgh.pa.us, dr.jpap@gmail.com
Subject: Re: Query-plan for partitioned UPDATE/DELETE slow and swaps vmem compared to SELECT
In-Reply-To: <14012.1291443654@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox