RE: Performance off "count(*)"

From: Tanel Poder <tanel.poder.003_at_mail.ee>
Date: Sun, 20 Jul 2008 15:15:51 +0800
Message-id: <91825A5F214B4DAD91AA138A2F4107EF@windows01>


Hi Greg,

> -----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-l
Received on Sun Jul 20 2008 - 02:15:51 CDT

Original text of this message