Re: Very slow planning performance on partition table - Mailing list pgsql-performance

From Tom Lane
Subject Re: Very slow planning performance on partition table
Date
Msg-id 25010.1406253203@sss.pgh.pa.us
Whole thread Raw
In response to Very slow planning performance on partition table  (Rural Hunter <ruralhunter@gmail.com>)
Responses Re: Very slow planning performance on partition table  (Rural Hunter <ruralhunter@gmail.com>)
Re: Very slow planning performance on partition table  (Rural Hunter <ruralhunter@gmail.com>)
List pgsql-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


pgsql-performance by date:

Previous
From: Craig Ringer
Date:
Subject: Re: High rate of transaction failure with the Serializable Isolation Level
Next
From: Rural Hunter
Date:
Subject: Re: Very slow planning performance on partition table