Re: Performance off "count(*)"

From: Jonathan Lewis <jonathan_at_jlcomp.demon.co.uk>
Date: Sat, 19 Jul 2008 14:36:18 +0100
Message-ID: <05b601c8e9a4$6c98a2f0$4001a8c0@Primary>

Nuno,

The number of gets might be the same, but the name of the call used to do the get could be different if there's some code which says:   if it's a nice block do X otherwise do Y rather than code that simply says
  do Y

Regards

Jonathan Lewis
http://jonathanlewis.wordpress.com

Author: Cost Based Oracle: Fundamentals
http://www.jlcomp.demon.co.uk/cbo_book/ind_book.html

The Co-operative Oracle Users' FAQ
http://www.jlcomp.demon.co.uk/faq/ind_faq.html

  • Original Message ----- From: "Nuno Souto" <dbvision_at_iinet.net.au> Cc: <oracle-l_at_freelists.org> Sent: Saturday, July 19, 2008 10:58 AM Subject: Re: Performance off "count(*)"

> This was my understanding as well: x$kcbsw shows the
> same number of blocks, because regardless of count(*)
> counting the rows in the block header or traversing the
> row chain in the block, the block itself must be read
> in both cases. What might be saved is the CPU spent
> traversing the block. That might be relevant for very
> small rows and/or very large blocks, with many rows
> per block?
>

--
http://www.freelists.org/webpage/oracle-l
Received on Sat Jul 19 2008 - 08:36:18 CDT

Original text of this message