From: Ron <ronljohnsonjr@gmail.com>
To: pgsql-general@lists.postgresql.org
Subject: Re: Measuring the Query Optimizer Effect: Turning off the QO?
Date: Sun, 7 Jul 2019 19:39:02 -0500
Message-ID: <08b1ba25-f21d-96ec-1ed8-8315d3190945@gmail.com> (raw)
In-Reply-To: <AM6PR04MB554433182A82A1F7B2CEB846F4F70@AM6PR04MB5544.eurprd04.prod.outlook.com>
References: <AM6PR04MB5544CCC486DA6B21968A1217F4F70@AM6PR04MB5544.eurprd04.prod.outlook.com>
<6E1859C3-4453-4AC2-ABE9-C4F40E5CCDC0@gmail.com>
<AM6PR04MB554433182A82A1F7B2CEB846F4F70@AM6PR04MB5544.eurprd04.prod.outlook.com>
On 7/7/19 6:49 PM, Tom Mercha wrote:
> On 08/07/2019 01:46, Rob Sargent wrote:
>>> On Jul 7, 2019, at 5:22 PM, Tom Mercha <mercha_t@hotmail.com> wrote:
>>>
>>> Hi All
>>>
>>> As we know, a query goes through number of stages before it is executed.
>>> One of these stages is query optimization (QO).
>>>
>>> There are various parameters to try and influence optimizer decisions
>>> and costs. But I wanted to measure the effect of such a stage by turning
>>> it off completely and I can't find such a parameter which explicitly
>>> does that. Then I could execute a query to get the effect of "QO active
>>> and "QO inactive" and compare.
>>>
>>> Obviously, I know well what the results would generally look like but I
>>> am just interested in measuring the differences for various types of
>>> queries. I am also aware that this is a simple comparison - there are
>>> more interesting comparisons to perform with QO tweaks, but right now I
>>> am interested in something basic.
>>>
>>> So how would one shut down QO? Or at least, obtaining the guarantee of
>>> generating the worst plan possible, ideally without touching many
>>> parameters?
>>>
>>> Best,
>>> Tom
>> Drop all indices?
>>
> Sorry, maybe my question wasn't clear enough.
>
> A query can be rewritten in various ways by applying rules and costs of
> relational algebra operators, as well as their parallelisation. I am
> talking about turning off this query optimization, so I am already
> assuming that indexes aren't present.
It seems as though you're asking what the "First Approximation" plan is,
before it tries to get Too Clever. However, I don't think there's a
separation between Query *Planner* and Query *Optimizer*.
https://www.postgresql.org/docs/9.6/planner-optimizer.html
--
Angular momentum makes the world go 'round.
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-general@postgresql.org
Cc: ronljohnsonjr@gmail.com
Subject: Re: Measuring the Query Optimizer Effect: Turning off the QO?
In-Reply-To: <08b1ba25-f21d-96ec-1ed8-8315d3190945@gmail.com>
References: <AM6PR04MB5544CCC486DA6B21968A1217F4F70@AM6PR04MB5544.eurprd04.prod.outlook.com> <6E1859C3-4453-4AC2-ABE9-C4F40E5CCDC0@gmail.com> <AM6PR04MB554433182A82A1F7B2CEB846F4F70@AM6PR04MB5544.eurprd04.prod.outlook.com> <08b1ba25-f21d-96ec-1ed8-8315d3190945@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 DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox