Search Postgresql Archives

Re: Seq Scan

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Kevin Hunter <hunteke@xxxxxxxxxxx> 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


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux