RE: Performance off "count(*)"
Date: Sun, 20 Jul 2008 15:15:51 +0800
> -----Original Message-----
> From: oracle-l-bounce_at_freelists.org
> [mailto:oracle-l-bounce_at_freelists.org] On Behalf Of Greg Rahn
> Sent: Sunday, July 20, 2008 07:06
> To: Tanel Poder
> Cc: oracle-l_at_freelists.org
> Subject: Re: Performance off "count(*)"
> I think we are saying the same thing: the count can be
> determined by just the block header. No?
Nope, as far as I know (and have elaborated in other posts in this thread) the rowcount can *not* be detected by reading the block header only. The reason is that the row count field in block header includes also deleted rows and continued rowpieces of chained rows which you shouldn't count.
-- Regards, Tanel Poder http://blog.tanelpoder.com -- http://www.freelists.org/webpage/oracle-lReceived on Sun Jul 20 2008 - 02:15:51 CDT