Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: newbie index question
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>...Received on Thu Feb 15 2001 - 02:33:46 CST
>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
>
![]() |
![]() |