beginner problems with count(*)

From: Me Self <wmsopou(at)gmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: beginner problems with count(*)
Date: 2010-04-08 08:36:52
Message-ID: i2m4be2be551004080136t722e6f60xf863c4d33adaad2b@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hello Im just getting started using postgres and Ive run run into a
problem with count(*):

When I do "select count(*) from mytable" or "select count(*) from
mytable where mycolumn=x" then I get wrong number. The number of rows
returned is lower than the actual number. How can that happen? The
table is generally updated from JDBC with autocommit true and there is
no concurrent acess to the database yet - so I shouldnt have any open
transactions. The first few rows in the table was added from
pgAdminIII which has had its database connection time out on occasions
long after I was finished doing any work though..

Im using postgres 8.4.0 on linux 32 bit. Hope someone can help?

Responses

Browse pgsql-general by date

  From Date Subject
Next Message A. Kretschmer 2010-04-08 09:27:08 Re: beginner problems with count(*)
Previous Message Yeb Havinga 2010-04-08 08:27:29 Re: Solid State Drives with PG