Kevin Hunter <[EMAIL PROTECTED]> writes:
> At 1:17p -0400 on 01 Jun 2007, Tyler Durden wrote:
>> I find strange that a simple SELECT COUNT(...) is so slow with only
>> 700 000 records.

> The much more knowledgable will correct me, but the abbr. version is  
> that it is for data integrity and correctness reasons and the  
> inherent way in which the MVCC model works.

The bottom line is that a "correct" implementation (ie, one that fully
respects MVCC behavior) would create enormous overhead, as well as bad
contention bottlenecks for concurrent updates.  It doesn't seem worth it.

If you want a cheap approximate answer, there are a couple of ways to
get one, but SELECT COUNT(*) is not that.

                        regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 4: Have you searched our list archives?

               http://archives.postgresql.org/

Reply via email to