Re: Performance off "count(*)"

  • From: "Greg Rahn" <greg@xxxxxxxxxxxxxxxxxx>
  • To: Christian.Antognini@xxxxxxxxxxxx
  • Date: Sun, 20 Jul 2008 07:59:15 -0700

So I, like Jonathan did not pick up on "row header" and "block
header", and misspoke initially.

The optimization is simply that all the rows are not read, then
counted, but rather the *row* header is read.
And yes, it does depend on if a predicate is used or not.

Now are we in agreement in both words and thoughts?  =)

On Sun, Jul 20, 2008 at 1:00 AM, Christian Antognini
<Christian.Antognini@xxxxxxxxxxxx> wrote:
> As a result, the only way to get the number of rows is to read the "row
> header" of the table on which the count must be performed. Therefore,
> IMO and according to my tests, the only optimization of the count(*) is
> to be able to access the row header only. In other words, to completely
> skip row data.

-- 
Regards,
Greg Rahn
http://structureddata.org
--
//www.freelists.org/webpage/oracle-l


Other related posts: