pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: legrand legrand <legrand_legrand@hotmail.com>
To: pgsql-performance@postgresql.org
Subject: Re: Fwd: Query with high planning time compared to execution time
Date: Fri, 2 Nov 2018 15:51:40 -0700 (MST)
Message-ID: <1541199100540-0.post@n3.nabble.com> (raw)
In-Reply-To: <8db7abc2-9ddf-858c-e3db-af014cf2ccd9@2ndquadrant.com>
References: <CALhvPTS3XmDa7Px2WdZhyvwHPsqC=KKQ2kTsGL0KZiuwGF8C4g@mail.gmail.com>
	<8db7abc2-9ddf-858c-e3db-af014cf2ccd9@2ndquadrant.com>

Tomas Vondra-4 wrote
> On 11/02/2018 10:36 AM, Richard Lee wrote:
> [...]
> 
>> What are my other options to improve the query planning time?
>> 
> 
> Can you do a bit of profiling, to determine which part of the query
> planning process is slow here? 
> [...]

After planning profiling, (or in //), you can try to limit the number of
plans 
that the planner has to evaluate:

setting enable_mergejoin to off, or some others from 
https://www.postgresql.org/docs/10/static/runtime-config-query.html
but you will have to check that the chosen plan is still good

An other way is maybe reducing the number of indexes (you have so many 
ones ...). Usually, needed indexes are PK, UK, indexes for FK, and a "few" 
more.

Could you provide the SQL query to check that ?

Regards
PAscal  




--
Sent from: http://www.postgresql-archive.org/PostgreSQL-performance-f2050081.html




view thread (8+ messages)  latest in thread

Message-ID: <1541199100540-0.post@n3.nabble.com>
Permalink:  ../1541199100540-0.post@n3.nabble.com/
Also on:    postgresql.org/message-id/1541199100540-0.post@n3.nabble.com

 · 

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: legrand_legrand@hotmail.com
  Subject: Re: Fwd: Query with high planning time compared to execution time
  In-Reply-To: <1541199100540-0.post@n3.nabble.com>

* 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