public inbox for [email protected]  
help / color / mirror / Atom feed
From: Sašo Gantar <[email protected]>
To: David Rowley <[email protected]>
Cc: [email protected]
Subject: Re: problem with query
Date: Mon, 20 May 2024 13:09:00 +0200
Message-ID: <CAGB0_640Kv4c9Kq5qDNZCNcAxo-_aO=AaKJqBann+iNiU0imWA@mail.gmail.com> (raw)
In-Reply-To: <CAApHDvq=sj+vVQ6HKOdNLeWbQnHErg5QPSz26s0a90PtY1NLdw@mail.gmail.com>
References: <CAGB0_6600w5C=hvhgfMWCqO9BCwCg+3s0PxXuoQv48NLqTp6dA@mail.gmail.com>
	<CAApHDvq=sj+vVQ6HKOdNLeWbQnHErg5QPSz26s0a90PtY1NLdw@mail.gmail.com>

what helps is
SET enable_nestloop = off;
query takes less then 2seconds

but it's probably not a good idea to change this flag

On Wed, 15 May 2024 at 13:23, David Rowley <[email protected]> wrote:

> On Wed, 15 May 2024 at 21:08, Sašo Gantar <[email protected]> wrote:
> > this query takes more than 8 seconds,
> > if i remove "AND ((pgn.nspname='servicedesk'))" and test it, it takes <1s
>
> Including the EXPLAIN rather than EXPLAIN (ANALYZE, BUFFERS) isn't
> very useful as there's no way to tell if the planner's estimates were
> accurate or not. Also with EXPLAIN only, we don't know where the time
> was spent in the query.
>
> Running the EXPLAIN with "SET track_io_timing = 1;" would be even more
> useful.
>
> David
>


view thread (2+ 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], [email protected]
  Subject: Re: problem with query
  In-Reply-To: <CAGB0_640Kv4c9Kq5qDNZCNcAxo-_aO=AaKJqBann+iNiU0imWA@mail.gmail.com>

* 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