> Don Baccus <[EMAIL PROTECTED]> writes:
> > The optimizer should do a better job on your first query, sure, but why
> > don't you like writing joins?
>
> The join wouldn't give quite the same answers. If there are multiple
> rows in table2 matching a particular table1 row, then a join would giv
Bruce Momjian <[EMAIL PROTECTED]> writes:
>> Now that the executor understands about multiple join rules (for
>> OUTER JOIN support), I've been thinking about inventing a new join rule
>> that says "at most one output row per left-hand row" --- this'd be sort
>> of the opposite of the LEFT OUTER J
> Now, given the two components, each with very low costs, it chooses to
> do a sequential scan on the table. I don't get it.
Read the FAQ?
http://www.postgresql.org/docs/faq-english.html#4.23
"4.23) Why are my subqueries using IN so slow?")
- Andrew
At 10:52 AM 11/30/00 -0500, Tom Lane wrote:
>Don Baccus <[EMAIL PROTECTED]> writes:
>> The optimizer should do a better job on your first query, sure, but why
>> don't you like writing joins?
>
>The join wouldn't give quite the same answers. If there are multiple
>rows in table2 matching a partic
Don Baccus <[EMAIL PROTECTED]> writes:
> The optimizer should do a better job on your first query, sure, but why
> don't you like writing joins?
The join wouldn't give quite the same answers. If there are multiple
rows in table2 matching a particular table1 row, then a join would give
multiple c
At 08:37 AM 11/30/00 -0500, mlw wrote:
>> mlw wrote:
>> >
>> > Why is a "select * from table1 where field in (select field from table2
>> > where condition )"
>> >
>> > is so dramatically bad compared to:
>> >
>> > "select * from table1, table2 where table1.field = table2.field and
>> > condition"
mlw wrote:
>
> Hannu Krosing wrote:
> >
> > mlw wrote:
> > >
> > > Why is a "select * from table1 where field in (select field from table2
> > > where condition )"
> > >
> > > is so dramatically bad compared to:
> > >
> > > "select * from table1, table2 where table1.field = table2.field and
> > >
Hannu Krosing wrote:
>
> mlw wrote:
> >
> > Why is a "select * from table1 where field in (select field from table2
> > where condition )"
> >
> > is so dramatically bad compared to:
> >
> > "select * from table1, table2 where table1.field = table2.field and
> > condition"
> >
> > I can't underst
mlw wrote:
>
> Why is a "select * from table1 where field in (select field from table2
> where condition )"
>
> is so dramatically bad compared to:
>
> "select * from table1, table2 where table1.field = table2.field and
> condition"
>
> I can't understand why the first query isn't optimized be
Why is a "select * from table1 where field in (select field from table2
where condition )"
is so dramatically bad compared to:
"select * from table1, table2 where table1.field = table2.field and
condition"
I can't understand why the first query isn't optimized better than the
second one. The 'i
10 matches
Mail list logo