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

Home -> Community -> Mailing Lists -> Oracle-L -> Re: Dead slow count(*)

Re: Dead slow count(*)

From: Wolfgang Breitling <breitliw_at_centrexcc.com>
Date: Thu, 29 Jan 2004 21:53:15 -0700
Message-Id: <6.0.0.22.2.20040129215002.02ef4368@pop.centrexcc.com>


That, of course, is the crucial piece. The index must contain a "not null" column or else Oracle can not guarantee that every row will be indexed and that therefore the count of indexed entries will be equal to the count of rows.

At 06:20 PM 1/29/2004, you wrote:
>17:19:19 rsysdevdb.radisys.com - jkstill_at_dv01 SQL> alter table
>count_test modify( row_number not null)

>17:19:19 rsysdevdb.radisys.com - jkstill_at_dv01 SQL> create index ct_idx_1
>on count_test(row_number);

Wolfgang Breitling
Oracle7, 8, 8i, 9i OCP DBA
Centrex Consulting Corporation
http://www.centrexcc.com



Please see the official ORACLE-L FAQ: http://www.orafaq.com

To unsubscribe send email to: oracle-l-request_at_freelists.org put 'unsubscribe' in the subject line.
--
Archives are at http://www.freelists.org/archives/oracle-l/
FAQ is at http://www.freelists.org/help/fom-serve/cache/1.html
-----------------------------------------------------------------
Received on Thu Jan 29 2004 - 22:53:15 CST

Original text of this message

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