Re: Very slow planning performance on partition table

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Rural Hunter <ruralhunter(at)gmail(dot)com>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: Very slow planning performance on partition table
Date: 2014-07-25 01:53:23
Message-ID: 25010.1406253203@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin pgsql-performance

Rural Hunter <ruralhunter(at)gmail(dot)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

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Rural Hunter 2014-07-25 03:26:03 Re: Very slow planning performance on partition table
Previous Message Rural Hunter 2014-07-24 01:30:12 Re: Very slow planning performance on partition table

Browse pgsql-performance by date

  From Date Subject
Next Message Rural Hunter 2014-07-25 03:26:03 Re: Very slow planning performance on partition table
Previous Message Craig Ringer 2014-07-25 01:30:03 Re: High rate of transaction failure with the Serializable Isolation Level