Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Record row count and execution time into table?

Re: Record row count and execution time into table?

From: Niall Litchfield <Niall.litchfield_at_dial.pipex.com>
Date: Mon, 03 Oct 2005 06:38:41 +0100
Message-ID: <4340c2ba$0$5207$cc9e4d1f@news.dial.pipex.com>


IANAL_VISTA wrote:
> Niall Litchfield <Niall.litchfield_at_dial.pipex.com> wrote in
> news:43400A9E.8030009_at_dial.pipex.com:
>
>

>>www.twisted-nail.com wrote:
>>
>>>Hi,
>>>
>>>Counting the rows in the table is performed by full table scan. 
>>
>>Unless it is done via an index. bitmap or normal indexes can, but don't 
>>necessarily, provide the best access path for a count(*).
>>

>
>
> Since NULLs are not stored in an index, the results might not be 100%
> accurate if the index is used to generate the COUNT.

If the index can't be used to satisfy the query - it won't be used. B*Tree indexes on nullable columns therefore won't be considered (or it is a bug if they are). B*Tree indexes on NOT NULL columns can be considred. Bitmap indexes do indicate null values.

You'll have to wait till later on today for a demo - can't believe I trashed that database on this machine.

-- 
Niall Litchfield
Oracle DBA
http://www.niall.litchfield.dial.pipex.com
Received on Mon Oct 03 2005 - 00:38:41 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US