Re: problem with query - Mailing list pgsql-general

From Sašo Gantar
Subject Re: problem with query
Date
Msg-id CAGB0_640Kv4c9Kq5qDNZCNcAxo-_aO=AaKJqBann+iNiU0imWA@mail.gmail.com
Whole thread Raw
In response to Re: problem with query  (David Rowley <dgrowleyml@gmail.com>)
Responses Re: problem with query
List pgsql-general
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 <dgrowleyml@gmail.com> wrote:
On Wed, 15 May 2024 at 21:08, Sašo Gantar <sasog23@gmail.com> 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

pgsql-general by date:

Previous
From: Sašo Gantar
Date:
Subject: Re: problem with query
Next
From: milist ujang
Date:
Subject: Re: signal 11: Segmentation fault ; query constraint list; pg16.3