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

Home -> Community -> Usenet -> c.d.o.misc -> Re: When to Create Index?

Re: When to Create Index?

From: canecat <nikiforov_at_netcracker.com>
Date: Thu, 24 Feb 2005 05:27:19 -0500
Message-ID: <a02e1eb76cc2bb35d5f10b7ca66d9975@localhost.talkaboutdatabases.com>


>>For point 2, what do NULL values have to do with index?

Because B*-tree indexes don't include NULLs, you can use an index to reach not-null values very fast, and your index will have a relatively small size.

>>But,

why it is 2-4% and not some other values?

Don't mind it. There are different points of view at this figure. Consider the following - usually, to reach a certain value by index you will have to read 4 blocks - 3 index blocks and 1 data block. Using full scan you need to read from 1 to n blocks - depends on where your data are. If the average number of blocks you have to read to find data exceeds 4 - you can think about the using of the index. For example in the case of scattered data the 8-blocks table is a candidate for using indexes. 1/8 is about 15%, what is mentioned as the effectiveness threshold in Oracle9i Application Developer's Guide - Fundamentals. Received on Thu Feb 24 2005 - 04:27:19 CST

Original text of this message

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