Search code examples
postgresqlpgadmin

Wrong display of count(*) result with PgAdmin and postgresql 9.3


I'm a little confused with my data, postgres returns wrong value with a simple count(*)

I use a :

select count(*) from DimUsers 

it returns : 74280

this one :

select count(*) from DimUsers group by user_type

Returns :
72134,12288, 89850

this one :

select * from DimUser 

displays a table of 1674280 rows

And my full database is estimated by pgadmin to 1674280 rows.

I can't see what is wrong with it, this happened to anyone before?


Solution

  • I recently encountered a similar problem. However I found that pgAdmin 3 was in fact returning the correct count value, except the column size for the count column was not auto-sized correctly to fit the data and thus it seemed like it was only returning the last 5 digits of the count. Increasing the size of the count column by using the column resize on the header row allows you to see the full number, but unfortunately you have to do this for every query you run.