Re: how many records

From: Stuart Woodward <woodward(at)garage(dot)co(dot)jp>
To: pgsql-novice(at)postgresql(dot)org
Subject: Re: how many records
Date: 2003-09-11 01:20:23
Message-ID: 20030911101954.F765.WOODWARD@garage.co.jp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

> 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(at)bath(dot)ac(dot)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;

(I know that a lot of beginners always "select *" even when they don't
need all the information which (I think) is slower than selecting just
what need.)

In response to

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Bruno Wolff III 2003-09-11 01:50:27 Re: how many records
Previous Message Bryan Irvine 2003-09-10 20:29:41 Re: phone number list