Re: BUG #14393: Querry plan creation time is too long

From: Jeff Janes <jeff(dot)janes(at)gmail(dot)com>
To: ufaowl(at)gmail(dot)com
Cc: Pg Bugs <pgsql-bugs(at)postgresql(dot)org>
Subject: Re: BUG #14393: Querry plan creation time is too long
Date: 2016-10-24 19:11:47
Message-ID: CAMkU=1xoYidAp7dajEm-nLbLZZHC5=gRMPbK4+xhMb=mbQ3cKw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Mon, Oct 24, 2016 at 6:04 AM, <ufaowl(at)gmail(dot)com> wrote:

> The following bug has been logged on the website:
>
> Bug reference: 14393
> Logged by: Vadim Akbashev
> Email address: ufaowl(at)gmail(dot)com
> PostgreSQL version: 9.5.4
> Operating system: Centos 6.8
> Description:
>
> Hello!
> I have two questions concerning choosing\creation time of querry plan
> regaring default_statistic_target parameter. I noticed that querry plan
> creation time increases when default_statistic_target is more than 1000. It
> reaches 14 sec for database without any load when default_statistic_target
> =
> 10 000.
> I wonder:
> 1) Is such behavior considered normal? If it is, where I can get
> documentation regulating this?
>

It is normal that increasing default_statistic_target will increase
planning time. Increasing it to 14 seconds is undesirable, of course, but
without seeing the query it is hard to say more than that. This could be a
bug which leads to pathologically slow planning in some cases, or it could
be that your query is just a monster query that is difficult to plan.

2) Is there any way to limit querry plan creation time?
>

See the *_collapse_limit settings here,
https://www.postgresql.org/docs/9.5/static/runtime-config-query.html

And see the further sections referred to from there.

Cheers,

Jeff

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message balaji.chithambaram 2016-10-25 13:50:16 BUG #14395: sslmode=prefer not checking for certificate and allows connection as SSL
Previous Message Alvaro Herrera 2016-10-24 19:09:13 Re: BUG #14394: No error raised in IN-clause when commas are missing