public inbox for [email protected]
help / color / mirror / Atom feedFrom: Adam Brusselback <[email protected]>
To: Thomas Kellerer <[email protected]>
Cc: [email protected]
Subject: Re: Re: OLAP/reporting queries fall into nested loops over seq scans or other horrible planner choices
Date: Fri, 3 Nov 2017 08:07:13 -0400
Message-ID: <CAMjNa7dy23vwG4UEoTe+xcgJF6xj7bptVra_-BgieGTpJUYOSg@mail.gmail.com> (raw)
In-Reply-To: <[email protected]>
References: <[email protected]>
<[email protected]>
<[email protected]>
List-Unsubscribe: <mailto:[email protected]?body=unsub%20pgsql-performance>
On Fri, Nov 3, 2017 at 5:28 AM, Thomas Kellerer <[email protected]> wrote:
> I do like Oracle's approach with SQL profiles, where you can force the
> optimizer to try harder to find a good execution plan. I _think_ it even
> runs the statement with multiple plans and compares the expected outcome
> with the actual values. Once a better plan is found that plan can be
> attached to that query and the planner will use that plan with subsequent
> executions.
I also think that this is a really cool approach. For those specific
problem queries, pretty much tell the optimizer "do your best to make
this as efficient as possible".
To make that more useful though, you'd probably need a shared query
cache that would be persisted through restarts. I'd assume if you
have a problem query, this very heavy "planning / optimization"
operation would not be something you wanted every connection to have
to do every time they connect.
I wish I was more knowledgeable about the internals so I could more
clearly see how a system like that could come together, and what other
groundwork would be needed building up to it.
--
Sent via pgsql-performance mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-performance
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]
Subject: Re: Re: OLAP/reporting queries fall into nested loops over seq scans or other horrible planner choices
In-Reply-To: <CAMjNa7dy23vwG4UEoTe+xcgJF6xj7bptVra_-BgieGTpJUYOSg@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