Home » SQL & PL/SQL » SQL & PL/SQL » Index attributes
Index attributes [message #20173] Fri, 03 May 2002 06:38 Go to next message
Prasun Gupta
Messages: 1
Registered: May 2002
Junior Member
Hello There,
if an attribute in a select query is part of an index,
will the data fetch for the attribute be done just by the index, or it goes to the table.
Does this functionality differ between databases...

To illustrate:
select X from table Y
where
y.z = ??

index is based on combination of z,x...
Re: Index attributes [message #20176 is a reply to message #20173] Fri, 03 May 2002 15:31 Go to previous message
jmayers
Messages: 2
Registered: December 2001
Junior Member
index leaf blocks contain every indexed data value
and the corresponding rowid used to locate the row
in the table. The CBO will determine whether to
fetch the rows from the table or index. The CBO
will run as many as 80,000 permutations before it
will make a decision on which query to run.

when you run analyze, Oracle calculates the
num_rows,
blevel,
leaf_blocks,
distinct_keys,
avg_leaf_blocks_per_key,
avg_data_blocks_per_key and
clustering_factor for each index.

See the Oracle documentation on the ALL_INDEX view
for a complete description. you should memorize these
attributes of the index.

Good Luck
Previous Topic: I would like to FORCE Oracle to show me what it doesn't want to show me
Next Topic: need help!!
Goto Forum:
  


Current Time: Fri Apr 26 03:25:00 CDT 2024