View previous topic :: View next topic |
Author |
Message |
Ravichandra.Kota Beginner
Joined: 12 Sep 2005 Posts: 3 Topics: 2 Location: Hyderabad,India
|
Posted: Fri Sep 16, 2005 9:53 am Post subject: Indexes |
|
|
Hi,
DB2 do support two kinds of Indexes a) Unique b) Non-Unique.
and it is also know that indexes assures the uniqueness of data in columns . But some where it is mentioned that Non-Unique indexes allows duplicate keys. If duplicate Keys are allowed, how could it ensures the uniqueness of the data.
This concept is bit confusing. Can any one of you help me out in this regard .
Thanks in advance  _________________ Thanks & Regards
Ravichandra Kota |
|
Back to top |
|
 |
kolusu Site Admin

Joined: 26 Nov 2002 Posts: 12378 Topics: 75 Location: San Jose
|
Posted: Fri Sep 16, 2005 10:22 am Post subject: |
|
|
Ravichandra.kota,
An index is an ordered set of pointers to rows of a table. Conceptually, you can think of an index to the rows of a DB2 table like you think of an Index to the pages of a book. Each index is based on the values of data in one or more columns. DB2 can use indexes to improve performance and ensure uniqueness. In most cases, access to data is faster with an index than with a scan of the data. You can use nonunique indexes to improve the performance of data access when the values of the columns in the index are not necessarily unique.
Check this link which explains in detail about different type of indexes
http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/DSNITH10/2.4.6.2?DT=20010219152025
Hope this helps...
Cheers
Kolusu _________________ Kolusu
www.linkedin.com/in/kolusu |
|
Back to top |
|
 |
|
|