From: Hannu Krosing <hannu@trust.ee>
To: Bruce Momjian <maillist@candle.pha.pa.us>
Cc: David Hartwig <daveh@insightdist.com>
Cc: pgsql-interfaces@postgreSQL.org
Cc: hackers@postgreSQL.org
Subject: Re: [INTERFACES] Re: [HACKERS] changes in 6.4
Date: Thu, 16 Jul 1998 11:41:47 +0300
Message-ID: <35ADBCCB.3B1FB91B@trust.ee> (raw)
References: <199807152339.TAA07145@candle.pha.pa.us>
Bruce Momjian wrote:
>
> > The results are profound. Queries that used to scan tables because of the
>
> How about if instead of doing:
>
> select * from tab1 where val = 3
> union
> select * from tab1 where val = 4
> ...
>
> you change it to:
>
> select * from tab1 where val in (
> select 3
> union
> select 4
> )
>
the explosion happens for ORs of multiple ANDs that get rewritten to:
select * from tabl wehere val1=1 and val2=1 and val3=1
union
select * from tabl wehere val1=1 and val2=1 and val3=2
union
...
And there is no way of doing (at least presently):
select * from table where (val1,val2,val3) in (select 1,1,1 union select
1,1,2);
Hannu
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 using the --to and --cc options:
reply via email
To: pgsql-interfaces@postgresql.org
Cc: hannu@trust.ee, maillist@candle.pha.pa.us, daveh@insightdist.com, hackers@postgreSQL.org
Subject: Re: [INTERFACES] Re: [HACKERS] changes in 6.4
In-Reply-To: <35ADBCCB.3B1FB91B@trust.ee>
* 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