If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > two keys in a regular index

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 02-18-10, 12:15
maxwei maxwei is offline
Registered User
 
Join Date: Feb 2010
Posts: 1
two keys in a regular index

Hi!

When I create an Index with 2 collumns as key-values, what kind of index does db2 create?

example:
table schema is tab1{[a: integer, b: char(10)]}

index creation:

create index index1 on tab1 (a asc, b asc);

i don't use any clustering indexes, and

select indextype from syscat.indexes where indname='index1'

gives me "REG", so it's not a dimensional block index.

Therefore it must be a kind of B+ -tree, but how are 2 keys organized in a B+-Tree? are they somehow merged to one keyvalue?

Types of index access
seems to imply that one level of the b+-tree filled with key a -values and the next level with key b-values, but I couldn't find a clear statement on this.

a link pointing to an answer would be nice. thanks in advance.
Reply With Quote
  #2 (permalink)  
Old 02-18-10, 13:24
n_i n_i is offline
:-)
 
Join Date: Jun 2003
Location: Toronto, Canada
Posts: 4,449
Index key is a concatenation of values that make it up. Check the PDF Performance Guide for more details.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On