Dave Page wrote:
>>-----Original Message-----
>>From: Constantin Stefanov [mailto:cstef@mail.ru]
>>Sent: 22 October 2003 14:53
>>To: pgadmin-support@postgresql.org
>>Subject: [pgadmin-support] Very slow viewing of large table.
>>
>>When in PgAdmin3 I click on a large table, it waits before
>>opening it.
>>As far as I could understand, it issues a row count on a
>>table. Is there way to stop this behaviour?
>>I found a letter about the same problem of February 2002, and
>>Dave Page wrote he was intending to do something about.
>>Am I searching in the wrong place or there is no capability
>>for cancelling count queries?
>
> Under File -> Options -> Query there is an option to control this
> behaviour, though unless you have a slow server, it should have a
> sensible value following install. From the helpfile:
>
> "Count rows if estimated less than" - In the object browser, if the
> estimated number of rows in a table (as read from the table statistics)
> is below this limit, a SELECT count(*) will be performed to find the
> exact value.
Thanks, I set that value to 0, and now I have the desired behaviour.
But, for that table the values are:
Rows(estimated) - 7
Rows(counted) - 77204608
I think the difference is too large. From the debug output I could not
understand the query which pg_admin issues to have the value for
estimated number of rows. Could you show me that query so I could give
it directly from psql to see whether there is an error in my database
stats or there is a bug in pg_admin when interpreting query result?
--
Constantin Stefanov