Doubt in understanding about NON-UNIQUE INDEX

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • muzu1232004
    New Member
    • Aug 2007
    • 16

    Doubt in understanding about NON-UNIQUE INDEX

    If I have a table t1 with a column a as follows

    A
    1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    2
    2
    2
    2
    2
    2
    2
    2
    2
    2

    if i create a non unique index on column A of table t1
    and access a row by giving the following select statement
    select a from t1 where a > 1;

    where we get all the values that are '2' returning 10 rows.

    Here the non-unique index goes with index range scan.

    1) Is it that it also takes the rowid into account while accessing the row values of 2 ? Are the non-unique index values are unique ?


    2) Suppose if i want a particular row value from a particular position say for example 12th position in the column A. How can non-unique index will be useful and how it actually accesses and what will be the query?


    3) When and where the non-unique indexes are mainly used ?
Working...