Proposal: new GUC paramter - Mailing list pgsql-hackers

From Tatsuo Ishii
Subject Proposal: new GUC paramter
Date
Msg-id 20010925114228R.t-ishii@sra.co.jp
Whole thread Raw
Responses Re: Proposal: new GUC paramter
List pgsql-hackers
I see following in src/backend/optimizer/plan/planner.c
if (child && IsA(child, FromExpr)){
    /*     * Yes, so do we want to merge it into parent?    Always do     * so if child has just one element (since
thatdoesn't     * make the parent's list any longer).  Otherwise we have     * to be careful about the increase in
planningtime     * caused by combining the two join search spaces into     * one.  Our heuristic is to merge if the
mergewill     * produce a join list no longer than GEQO_RELS/2.     * (Perhaps need an additional user parameter?)
*/

This is really annoying since:

o these code fragments actually controls the optimization efforts for subqueries and views, not related to GEQO at all.
Sousing GEQO parameters for this kind of purpose seems abuse for me.
 

o Even if geqo = false in postgresql.con, the code looks into the GEQO value. This is really confusing for users.

So I propose a new GUC parameter called "subquery_merge_threshold"
solely for this purpose.

Comments?
--
Tatsuo Ishii


pgsql-hackers by date:

Previous
From: Alex Pilosov
Date:
Subject: Re: Changing data types
Next
From: Tatsuo Ishii
Date:
Subject: doc build error