On Mon, Sep 09, 2002 at 00:13:04 +0000,
  Colin Fox <[EMAIL PROTECTED]> wrote:
> 
> select
>    *
> from
>    motm
> order by
>    creation_date desc
> limit 1;
> 
> So in the first case I select the record that has the largest date. In the
> second case, I order all the records, and then return only one.

If you have an index on creation_date an index scan can be used which
will make the second form run a lot faster if there are lots of records.

---------------------------(end of broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]

Reply via email to