pgsql-bugs@postgresql.org writes:
> Release 7.0
> faqts=> explain select faqs.id from faqs, faq_keywords;
> NOTICE: QUERY PLAN:
> Nested Loop (cost=0.00..4908.80 rows=161320 width=8)
> -> Seq Scan on faqs (cost=0.00..2.40 rows=40 width=4)
> -> Seq Scan on faq_keywords (cost=0.00..82.33 rows=4033 width=4)
> EXPLAIN
> Compare with release 6.5 reaction:
> faqtat=> explain select faqs.id from faqs, faq_keywords;
> NOTICE: QUERY PLAN:
> Seq Scan on faqs (cost=43.00 rows=1000 width=4)
> EXPLAIN
7.0 is correct. 6.5 is broken. Read the SQL standard: "select a.f from
a" is not the same query as "select a.f from a,b". The latter should
return each a.f value as many times as there are rows in b.
regards, tom lane