Search Postgresql Archives

Re: [HACKERS] Much Ado About COUNT(*)

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

 



Wes <wespvp@xxxxxxxxxxxx> writes:

> On 1/13/05 9:50 AM, "Greg Stark" <gsstark@xxxxxxx> wrote:
> 
> Of course, in Oracle 'count(*)' is instantaneous.  It doesn't have to count
> the physical records one by one.

That's simply false. Oracle does indeed have to count the records one by one.

It doesn't have to read and ignore the dead records since they're in a
separate place (but on the other hand it sometimes have to go read that
separate place when it sees records that were committed after your
transaction).

It can also do index-only scans, which often helps, but it's still not
instantaneous.

-- 
greg


---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
    (send "unregister YourEmailAddressHere" to majordomo@xxxxxxxxxxxxxx)

[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