Re: What does count(*) count?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: csegyud(at)vnet(dot)hu
Cc: "Pgsql-General(at)Postgresql(dot)Org (E-mail)" <pgsql-general(at)postgresql(dot)org>
Subject: Re: What does count(*) count?
Date: 2003-12-31 16:26:37
Message-ID: 10771.1072887997@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

=?iso-8859-2?Q?Egy=FCd_Csaba?= <csegyud(at)vnet(dot)hu> writes:
> I found that count(*) results less rows than grep.

That's a tad hard to believe. I'm suspecting pilot error of some sort.

Perhaps you have more than one table named t_stockchanges (in different
databases or schemas) and you weren't looking at the same one in both
cases?

Another possibility is that t_stockchanges has child table(s). Your
SELECT would count rows in the child tables, but I don't think that
pg_dump -t would dump them.

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Robert Treat 2003-12-31 16:37:15 Re: Is my MySQL Gaining ?
Previous Message Együd Csaba 2003-12-31 16:19:04 Re: What does count(*) count?