public inbox for [email protected]
help / color / mirror / Atom feedFrom: Andrei Lepikhov <[email protected]>
To: Alexander Kulikov <[email protected]>
To: [email protected]
Subject: Re: small database huge planning time
Date: Tue, 13 Jan 2026 10:29:45 +0100
Message-ID: <[email protected]> (raw)
In-Reply-To: <AS4PR02MB874303264FDEF9B160C06DF9EA8EA@AS4PR02MB8743.eurprd02.prod.outlook.com>
References: <AS4PR02MB874303264FDEF9B160C06DF9EA8EA@AS4PR02MB8743.eurprd02.prod.outlook.com>
On 13/1/26 10:16, Alexander Kulikov wrote:
> Hello!
>
>
> I have got huge planning time for a query in quite small database in PortgreSQL 17
> Planning Time: 452.796 ms
> Execution Time: 0.350 ms
>
> Tried several version from 17.3 to 17.7 (cpu 2.2GHz) - it almost does not matter. If I run query many times in row planning time may reduce down to 430ms but never less.
>
> Tried in PortgreSQL 11 (in a little bit different hardware with cpu 2.60GHz) - planning time almost ten times less.
>
> Changing parameters: from_collapse_limit, join_collapse_limit, geqo, jit, work_mem and many
> others does not help at all. I attach 1. additional setting in the
> postgresql.status.conf. 2. querry itself in query.sql. 3. zql plan in
> query.sqlplan 4. additioanal information about os, tables etc. would you
May you attach the same EXPLAIN for the 'good' execution? Is there any
chance to get the schema definition as a SQL script (ideally,
without/replaced mvarchar fields)? Is it reproducible on a database with
empty tables?
--
regards, Andrei Lepikhov,
pgEdge
view thread (5+ messages) latest in thread
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: [email protected]
Cc: [email protected], [email protected]
Subject: Re: small database huge planning time
In-Reply-To: <[email protected]>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox