Re: "SELECT ... FROM DUAL" is not quite as silly as it appears - Mailing list pgsql-hackers

From Tom Lane
Subject Re: "SELECT ... FROM DUAL" is not quite as silly as it appears
Date
Msg-id 25353.1546636937@sss.pgh.pa.us
Whole thread Raw
In response to Re: "SELECT ... FROM DUAL" is not quite as silly as it appears  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
I wrote:
> If you reverse out just that change you'll see why I added it: without it,
> the plan for the earlier "test a corner case in which we shouldn't apply
> the star-schema optimization" isn't optimized as much as I thought it
> should be.

Hmm ... looking at this closer, it seems like this patch probably breaks
what that regression test case was actually meant to test, ie once we've
deleted the VALUES subselects from the jointree, it's likely that the
planner join-ordering mistake that was testing for can no longer happen,
because the join just plain doesn't exist.

I'll plan to deal with that by running the test case with actual small
tables instead of VALUES subselects.  It might be useful to run the test
case in its current form as an exercise for the RTE_RESULT optimizations,
but that would be separate from its current intention.

            regards, tom lane


pgsql-hackers by date:

Previous
From: Joerg Sonnenberger
Date:
Subject: Re: reducing the footprint of ScanKeyword (was Re: Large writablevariables)
Next
From: Sergei Agalakov
Date:
Subject: Re: explain plans with information about (modified) gucs