On Thu, Sep 11, 2003 at 10:20:23 +0900,
Stuart Woodward <woodward@garage.co.jp> wrote:
> > Bryan Irvine wrote:
> > Is there an easy way to count how many records there are?
>
> On Wed, 10 Sep 2003 18:26:30 +0100
> Simon Willison <cs1spw@bath.ac.uk> wrote:
>
> > Yes, using count(*):
> > select count(*) from tablename;
>
> Is there any performance difference in explicitly naming a column to
> count?
>
> i.e select count(id) from tablename;
Note that select count(id) and select count(*) can return different numbers.
Select count(*) is equivalent to select count(1) and I believe that
transformation (or something equivalent) is made by postgres.