Re: set command - Mailing list pgsql-hackers

From Tom Lane
Subject Re: set command
Date
Msg-id 16452.948481395@sss.pgh.pa.us
Whole thread Raw
List pgsql-hackers
"gary.wolfe" <gary.wolfe@biosourcetechnologies.com> writes:
>     Are there any disadvantages to having KSQO='on' instead
> of the default value of "OFF"

Other than it being a kluge, you mean ;-) ?

Basically it rewrites queries with long strings of ORs into SELECT UNION
SELECT queries, which the optimizer can cope with a little better.
Unfortunately the semantics aren't really quite the same, since UNION
implies a DISTINCT pass over the output --- the UNION form will never
emit two identical rows, whereas the original query would have if there
were identical input rows.

I'm hoping to get rid of KSQO soon by upgrading the optimizer to
the point where it doesn't choke on big ORs.  In the meantime, though,
you really don't have much choice if your application requires queries
with lots of ORs.
        regards, tom lane


pgsql-hackers by date:

Previous
From: The Hermit Hacker
Date:
Subject: Re: [HACKERS] Re: vacuum timings
Next
From: Tom Lane
Date:
Subject: Re: vacuum timings