pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Jeff Davis <pgsql@j-davis.com>
To: Isaac Morland <isaac.morland@gmail.com>
To: Nathan Bossart <nathandbossart@gmail.com>
Cc: pgsql-hackers@postgresql.org
Subject: Re: Faster "SET search_path"
Date: Tue, 01 Aug 2023 23:06:56 -0700
Message-ID: <e6a44336e2a8f70fe5a9a3da8072e4daab155ad0.camel@j-davis.com> (raw)
In-Reply-To: <CAMsGm5dt6szoTe5oAzk5nfbHHOEpMDVhLTOGWCJGCQ3Wq8+J0w@mail.gmail.com>
References: <04c8592dbd694e4114a3ed87139a7a04e4363030.camel@j-davis.com>
	<CAMsGm5fZ2xiVDLYH4-_Ld8bfe1qwY23ZLgPc7zBpH8d1WUw70A@mail.gmail.com>
	<f555c41554c7f5ff2699c085836ea94beac09bad.camel@j-davis.com>
	<20230802050720.GB866741@nathanxps13>
	<CAMsGm5dt6szoTe5oAzk5nfbHHOEpMDVhLTOGWCJGCQ3Wq8+J0w@mail.gmail.com>

On Wed, 2023-08-02 at 01:14 -0400, Isaac Morland wrote:
> I don’t think the fact that an optimization might suddenly not work
> in a certain situation is a reason not to optimize. What would our
> query planner look like if we took that approach?

...

> Instead, we should try to find ways of making the performance more
> transparent. We already have some features for this, but maybe more
> can be done.

Exactly; for the planner we have EXPLAIN. We could try to expose GUC
switching costs that way.

Or maybe users can start thinking of search_path as a performance-
related setting to be careful with.

Or we could try harder to optimize the switching costs so that it's not
so bad. I just started and I already saw some nice speedups; with a few
of the easy fixes done, the remaining opportunities should be more
visible in the profiler.

Regards,
	Jeff Davis





view thread (28+ messages)  latest in thread

Message-ID: <e6a44336e2a8f70fe5a9a3da8072e4daab155ad0.camel@j-davis.com>
Permalink:  ../e6a44336e2a8f70fe5a9a3da8072e4daab155ad0.camel@j-davis.com/
Also on:    postgresql.org/message-id/e6a44336e2a8f70fe5a9a3da8072e4daab155ad0.camel@j-davis.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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-hackers@postgresql.org
  Cc: pgsql@j-davis.com, isaac.morland@gmail.com, nathandbossart@gmail.com
  Subject: Re: Faster "SET search_path"
  In-Reply-To: <e6a44336e2a8f70fe5a9a3da8072e4daab155ad0.camel@j-davis.com>
  References: <04c8592dbd694e4114a3ed87139a7a04e4363030.camel@j-davis.com> <CAMsGm5fZ2xiVDLYH4-_Ld8bfe1qwY23ZLgPc7zBpH8d1WUw70A@mail.gmail.com> <f555c41554c7f5ff2699c085836ea94beac09bad.camel@j-davis.com> <20230802050720.GB866741@nathanxps13> <CAMsGm5dt6szoTe5oAzk5nfbHHOEpMDVhLTOGWCJGCQ3Wq8+J0w@mail.gmail.com> <e6a44336e2a8f70fe5a9a3da8072e4daab155ad0.camel@j-davis.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