pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Rural Hunter <ruralhunter@gmail.com>
Cc: pgsql-performance@postgresql.org
Subject: Re: Very slow planning performance on partition table
Date: Thu, 24 Jul 2014 21:53:23 -0400
Message-ID: <25010.1406253203@sss.pgh.pa.us> (raw)
In-Reply-To: <53CFB6BC.4050606@gmail.com>
References: <53CFB6BC.4050606@gmail.com>
List-Unsubscribe:  <mailto:majordomo@postgresql.org?body=unsub%20pgsql-performance>

Rural Hunter <ruralhunter@gmail.com> writes:
> I have a table partitioned with about 60 children tables.  Now I found 
> the planning time of simple query with partition key are very slow.
> ...
> You can see the timing output that the actual run time of the 'explain 
> analyze' is 30 seconds while the select sql itself takes only 3 ms. My 
> partition key is on article.pid and the constraint is simple like this: 
> CONSTRAINT article_88_pid_check CHECK (pid = 88). What's wrong and how 
> can I improve the planning performance?

[ shrug... ] Insufficient data.  When I try a simple test case based on
what you've told us, I get planning times of a couple of milliseconds.
I can think of contributing factors that would increase that, but not by
four orders of magnitude.  So there's something very significant that
you've left out.  Can you construct a self-contained test case that's
this slow?

			regards, tom lane


-- 
Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-performance



view thread (21+ messages)  latest in thread

Message-ID: <25010.1406253203@sss.pgh.pa.us>
Permalink:  ../25010.1406253203@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/25010.1406253203@sss.pgh.pa.us

 · 

reply

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, ruralhunter@gmail.com
  Subject: Re: Very slow planning performance on partition table
  In-Reply-To: <25010.1406253203@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