Skip site navigation (1) Skip section navigation (2)

Re: [INTERFACES] Re: [HACKERS] changes in 6.4

From: Hannu Krosing <hannu(at)trust(dot)ee>
To: Bruce Momjian <maillist(at)candle(dot)pha(dot)pa(dot)us>
Cc: David Hartwig <daveh(at)insightdist(dot)com>, pgsql-interfaces(at)postgreSQL(dot)org, hackers(at)postgreSQL(dot)org
Subject: Re: [INTERFACES] Re: [HACKERS] changes in 6.4
Date: 1998-07-16 08:41:47
Message-ID: 35ADBCCB.3B1FB91B@trust.ee (view raw or flat)
Thread:
Lists: pgsql-generalpgsql-hackerspgsql-interfaces
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

In response to

Responses

pgsql-hackers by date

Next:From: Vadim MikheevDate: 1998-07-16 08:51:35
Subject: Re: [INTERFACES] Re: [HACKERS] changes in 6.4
Previous:From: Hannu KrosingDate: 1998-07-16 08:30:11
Subject: Re: [INTERFACES] Re: [HACKERS] changes in 6.4

pgsql-interfaces by date

Next:From: Vadim MikheevDate: 1998-07-16 08:51:35
Subject: Re: [INTERFACES] Re: [HACKERS] changes in 6.4
Previous:From: Hannu KrosingDate: 1998-07-16 08:30:11
Subject: Re: [INTERFACES] Re: [HACKERS] changes in 6.4

pgsql-general by date

Next:From: Vadim MikheevDate: 1998-07-16 08:51:35
Subject: Re: [INTERFACES] Re: [HACKERS] changes in 6.4
Previous:From: Hannu KrosingDate: 1998-07-16 08:30:11
Subject: Re: [INTERFACES] Re: [HACKERS] changes in 6.4

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group