RE: Performance off "count(*)"

  • From: Tanel Poder <tanel.poder.003@xxxxxxx>
  • To: greg@xxxxxxxxxxxxxxxxxx, Marco.Gralike@xxxxxxx
  • Date: Sat, 19 Jul 2008 14:53:18 +0800

Hi Greg,

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...

--
Regards,
Tanel Poder
http://blog.tanelpoder.com
 

> -----Original Message-----
> From: oracle-l-bounce@xxxxxxxxxxxxx 
> [mailto:oracle-l-bounce@xxxxxxxxxxxxx] On Behalf Of Greg Rahn
> Sent: Saturday, July 19, 2008 05:44
> To: Marco.Gralike@xxxxxxx
> Cc: oracle-l@xxxxxxxxxxxxx
> Subject: Re: Performance off "count(*)"
> 
> On Fri, Jul 18, 2008 at 10:28 AM, Marco Gralike 
> <Marco.Gralike@xxxxxxx> wrote:
> >
> > Am I correct in my "small understanding" of Oracle that 
> "count(*)" has 
> > been optimized.
> 
> 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
> --
> //www.freelists.org/webpage/oracle-l
> 
> 

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


Other related posts: