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: newbie index question

Re: newbie index question

From: Jonathan Lewis <jonathan_at_jlcomp.demon.co.uk>
Date: Thu, 15 Feb 2001 08:33:46 -0000
Message-ID: <982225999.12720.1.nnrp-08.9e984b29@news.demon.co.uk>

Correct.

If any column in the index is NOT NULL, then every row in the table must appear in the index, so your count(*) from table will tell you how many rows are in the index. In fact, in this case, recent versions of Oracle have the option for doing a FAST FULL SCAN on the index in order to count the rows in the table.

--
Jonathan Lewis
Yet another Oracle-related web site:  http://www.jlcomp.demon.co.uk

Practical Oracle 8i:  Building Efficient Databases
Publishers:  Addison-Wesley

Reviews at: http://www.jlcomp.demon.co.uk/book_rev.html



Phillip wrote in message <3A8B0E1E.F2B02F22_at_wholefoods.com>...

>If I have an index on multiple columns, one of which is has a not null
>constraint, can I find out how many rows are in the index by simply
>doing a select count(*) on the table? My thinking is that since the
>column doesn't allow nulls, finding out how many rows in the table will
>tell me how many rows are in the index. Please advise...
>
>--
>Phillip
>
Received on Thu Feb 15 2001 - 02:33:46 CST

Original text of this message

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