Re: Performance off "count(*)"

From: Greg Rahn <greg_at_structureddata.org>
Date: Sat, 19 Jul 2008 16:06:16 -0700
Message-ID: <a9c093440807191606p2072028ft5a4d8ef1f8293bd6@mail.gmail.com>


I think we are saying the same thing: the count can be determined by just the block header. No?

> As far as I know the "nrow" in block header stores number of all row
> structures in a block, including deleted rows (with delete flag set in row
> header) and continued row pieces (chained rows) so Oracle still has to go to
> individual row header to determine whether to count it or not...

>> A count(*) that uses TABLE ACCESS FULL access does not have
>> to read each block in its entirety, it just reads the header
>> to see how many rows are in the block.  I guess you could
>> call that "optimized".


-- 
Regards,
Greg Rahn
http://structureddata.org
--
http://www.freelists.org/webpage/oracle-l
Received on Sat Jul 19 2008 - 18:06:16 CDT

Original text of this message