Re: SQL - finding next date - Mailing list pgsql-general

From Merlin Moncure
Subject Re: SQL - finding next date
Date
Msg-id b42b73150704121038i686314dcj74d824d40ae2af13@mail.gmail.com
Whole thread Raw
In response to Re: SQL - finding next date  (Raymond O'Donnell <rod@iol.ie>)
Responses Re: SQL - finding next date  (Alvaro Herrera <alvherre@commandprompt.com>)
List pgsql-general
On 4/12/07, Raymond O'Donnell <rod@iol.ie> 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

pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: Autovac _scale_ settings not changed by SIGHUP?
Next
From: Alvaro Herrera
Date:
Subject: Re: SQL - finding next date