From: Tom Lane <tgl@sss.pgh.pa.us>
To: Andrew Gierth <andrew@tao11.riddles.org.uk>
Cc: Tom Mercha <mercha_t@hotmail.com>
Cc: pgsql-general\@lists.postgresql.org <pgsql-general@lists.postgresql.org>
Subject: Re: Measuring the Query Optimizer Effect: Turning off the QO?
Date: Mon, 08 Jul 2019 12:29:28 -0400
Message-ID: <1831.1562603368@sss.pgh.pa.us> (raw)
In-Reply-To: <87muho5x24.fsf@news-spur.riddles.org.uk>
References: <AM6PR04MB5544CCC486DA6B21968A1217F4F70@AM6PR04MB5544.eurprd04.prod.outlook.com>
<20762.1562549204@sss.pgh.pa.us>
<87muho5x24.fsf@news-spur.riddles.org.uk>
Andrew Gierth <andrew@tao11.riddles.org.uk> writes:
> "Tom" == Tom Lane <tgl@sss.pgh.pa.us> writes:
> Tom> Two I'd particularly draw your attention to are
> Tom> join_collapse_limit and from_collapse_limit --- if you set both to
> Tom> 1, that'll effectively disable searching for a good join order,
> Tom> causing the join order to match the syntactic structure of the
> Tom> FROM clause. For instance "FROM a,b,c" will always be done by
> Tom> joining a to b first
> FROM a,b,c can always be planned in any join order.
Ah, right, -ENOCAFFEINE. What from_collapse_limit really does is
prevent flattening sub-SELECTs when doing so would add more join-order
freedom in the parent query. But ignoring sub-SELECTs, using explicit
JOIN syntax with join_collapse_limit=1 will let you control the
join order.
regards, tom lane
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: tgl@sss.pgh.pa.us, andrew@tao11.riddles.org.uk, mercha_t@hotmail.com
Subject: Re: Measuring the Query Optimizer Effect: Turning off the QO?
In-Reply-To: <1831.1562603368@sss.pgh.pa.us>
References: <AM6PR04MB5544CCC486DA6B21968A1217F4F70@AM6PR04MB5544.eurprd04.prod.outlook.com> <20762.1562549204@sss.pgh.pa.us> <87muho5x24.fsf@news-spur.riddles.org.uk> <1831.1562603368@sss.pgh.pa.us>
* 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