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 <dgrowle...@gmail.com> wrote:

> On Wed, 15 May 2024 at 21:08, Sašo Gantar <saso...@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
>

Reply via email to