[PERFORM] select count(*) on large tables

2004-04-08 Thread Cosimo Streppone
Hello, I've followed the last discussion about the particular case of select count(*)s on large tables being somewhat slow. I've seen also this issue already on the todo list, so I know it is not a simple question. This problem arises for me on very large tables, which I mean starting from 1

Re: [PERFORM] select count(*) on large tables

2004-04-08 Thread Dennis Bjorklund
On Thu, 8 Apr 2004, Cosimo Streppone wrote: The alternative solution I tried, that has an optimal speed up, unfortunately is not a way out, and it is based on EXPLAIN SELECT count(*) output parsing, which is obviously *not* reliable. Try this to get the estimate: SELECT relname,

Re: [PERFORM] select count(*) on large tables

2004-04-08 Thread Tom Lane
Cosimo Streppone [EMAIL PROTECTED] writes: Is there an estimate time for this issue to be resolved? Approximately never. It's a fundamental feature of Postgres' design. As noted by Dennis, you can look at the pg_class statistics if a recent estimate is good enough, or you can build user-level