public inbox for [email protected]
help / color / mirror / Atom feedFrom: Thomas Kellerer <[email protected]>
To: [email protected]
Subject: Re: OLAP/reporting queries fall into nested loops over seq scans or other horrible planner choices
Date: Fri, 3 Nov 2017 02:28:47 -0700 (MST)
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>
References: <[email protected]>
<[email protected]>
List-Unsubscribe: <mailto:[email protected]?body=unsub%20pgsql-performance>
Laurenz Albe schrieb am 02.11.2017 um 09:30:
> Finally, even though the official line of PostgreSQL is to *not* have
> query hints, and for a number of good reasons, this is far from being
> an unanimous decision. The scales may tip at some point, though I
> personally hope that this point is not too close.
I also think that hints are not the right way to solve problems like that.
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.
This however requires a much bigger infrastructure then simple hints.
(Unrelated, but: maybe a compromise of the never-ending "hints vs. no hints"
discussion would be, to think about integrating the existing "pg_hint_plan"
as a standard contrib module)
Thomas
--
Sent from: http://www.postgresql-archive.org/PostgreSQL-performance-f2050081.html
--
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]
Subject: Re: OLAP/reporting queries fall into nested loops over seq scans or other horrible planner choices
In-Reply-To: <[email protected]>
* 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