RE: Performance off "count(*)"

  • From: Tanel Poder <tanel.poder.003@xxxxxxx>
  • To: greg@xxxxxxxxxxxxxxxxxx
  • Date: Sun, 20 Jul 2008 15:15:51 +0800

Hi Greg, 

> -----Original Message-----
> From: oracle-l-bounce@xxxxxxxxxxxxx 
> [mailto:oracle-l-bounce@xxxxxxxxxxxxx] On Behalf Of Greg Rahn
> Sent: Sunday, July 20, 2008 07:06
> To: Tanel Poder
> Cc: oracle-l@xxxxxxxxxxxxx
> 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

--
//www.freelists.org/webpage/oracle-l


Other related posts: