[HACKERS] LIMIT and JOINS

2006-02-22 Thread Gregor Zeitlinger
Hi, I have a question on implementation of the LIMIT SQL clause. Using the LIMIT clause, I want to reduce the computation time for a query. When I try to limit the result of a joined table, however, the join will be computed first (which takes very long). Lets suppose the

Re: [HACKERS] LIMIT and JOINS

2006-02-22 Thread Tom Lane
Gregor Zeitlinger [EMAIL PROTECTED] writes: select * from T1 join T2 on T1.id =3D T2.id LIMIT 1 Conceptually, it should be possible to fetch one row from T1 and T2, = i.e. to propagate the LIMIT clause. I was wondering what the exact requirements are to propagate the LIMIT = clause.