Results 1 to 2 of 2
  1. #1
    Join Date
    Feb 2010

    Unanswered: two keys in a regular index


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

    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.

  2. #2
    Join Date
    Jun 2003
    Toronto, Canada
    Provided Answers: 1
    Index key is a concatenation of values that make it up. Check the PDF Performance Guide for more details.
    "It does not work" is not a valid problem statement.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts