On 4/12/07, Raymond O'Donnell <rod@xxxxxx> wrote:
On 12/04/2007 18:01, Merlin Moncure wrote: > I tested it and this is much faster than 'where exists' solution. Is this an attribute of PostgreSQL in particular, or would it be true of RDBMSs in general?
evaluation of subqueries is one place where various databases quite a lot...postgresql one of the nice things about postgresql is that sql optimization usually (but not always) entails finding the most direct query to attack the problem. other databases might prefer joins or standard subquery approach (where in/exists, etc). my suggestion to return the record in a field as a composite type is a non-standard trick (i think...do composite types exist in the sql standard?). merlin