Results 1 to 3 of 3
  1. #1
    Join Date
    Oct 2009
    Posts
    6

    Unanswered: DB2 Query use nonmatching index scan

    DB2 Query use nonmatching index scan

    I have table which has 6 million rows and 63 parts and one partitioned clustered/unique index with 3 cols. runstats are uptodate and DB2 V10 on z/os

    When I use simple select from this table like below
    SELECT X.*
    FROM T1 X
    WHERE X.C1 = ?
    AND X.C2 = ?
    AND X.C3 BETWEEN 1 AND 2000
    WITH UR
    It showed matching 3 cols index access
    But when I use
    SELECT X.*
    FROM T1 X
    WHERE X.C1 = '999123'
    AND X.C2 = '657890'
    AND X.C3 BETWEEN 1 AND 2000
    WITH UR

    It showed nonmatching index scan..
    Can any one tell use why this not using Matching index .

    Thank you all

    Sri

  2. #2
    Join Date
    Apr 2006
    Location
    Belgium
    Posts
    2,514
    Provided Answers: 11
    you should describe the table and the indexes..
    db2 explain...
    Best Regards, Guy Przytula
    Database Software Consultant
    Good DBAs are not formed in a week or a month. They are created little by little, day by day. Protracted and patient effort is needed to develop good DBAs.
    Spoon feeding : To treat (another) in a way that discourages independent thought or action, as by overindulgence.
    DB2 UDB LUW Certified V7-V8-V9-V9.7-V10.1-V10.5 DB Admin - Advanced DBA -Dprop..
    Information Server Datastage Certified
    http://www.infocura.be

  3. #3
    Join Date
    Dec 2007
    Location
    Richmond, VA
    Posts
    1,328
    Provided Answers: 5
    Is column C3 the first column of the index you talk about?

Posting Permissions

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