Re: [HACKERS] sub queries and caching.

2001-07-24 Thread mlw
Kevin wrote: > > While I'm sure it's just because of the simplicity of this example, it > seems that the query could be reorganized to avoid this double query: > > select * from foo F, bar B where B.name = 'bla' and (B.name = F.name or > B.type = F.type); That was the original format of the que

Re: [HACKERS] sub queries and caching.

2001-07-22 Thread mlw
Andrew McMillan wrote: > > mlw wrote: > > > > Take these queries: > > > > select * from foo as F, (select * from bar where name = 'bla') as B where > > F.name = B.name > > union all > > select * from foo as F, (select * from bar where name = 'bla') as B where > > F.type = B.type > > > > OR > > >

[HACKERS] sub queries and caching.

2001-07-21 Thread mlw
Take these queries: select * from foo as F, (select * from bar where name = 'bla') as B where F.name = B.name union all select * from foo as F, (select * from bar where name = 'bla') as B where F.type = B.type OR create temp table B as select * from bar where name = 'bla'; select * from foo as