List Digest, Jan 08, 2019

Ravikumar sri2001

List Digest, Jan 08, 2019
Eric,
Thank you so much!

From: AMIEL Eric <[login to unmask email]>
To: "[login to unmask email]" <[login to unmask email]>
Cc: CASTELLA jean-francois <[login to unmask email]>; "[login to unmask email]" <[login to unmask email]>; "[login to unmask email]" <[login to unmask email]>
Sent: Wednesday, January 9, 2019 8:43 PM
Subject: RE: [IDUGNA] - List Digest, Jan 08, 2019

<!--#yiv6479794687 _filtered #yiv6479794687 {font-family:"Cambria Math";panose-1:2 4 5 3 5 4 6 3 2 4;} _filtered #yiv6479794687 {font-family:Calibri;panose-1:2 15 5 2 2 2 4 3 2 4;} _filtered #yiv6479794687 {font-family:Verdana;panose-1:2 11 6 4 3 5 4 4 2 4;}#yiv6479794687 #yiv6479794687 p.yiv6479794687MsoNormal, #yiv6479794687 li.yiv6479794687MsoNormal, #yiv6479794687 div.yiv6479794687MsoNormal {margin:0cm;margin-bottom:.0001pt;font-size:12.0pt;font-family:"Times New Roman", serif;}#yiv6479794687 a:link, #yiv6479794687 span.yiv6479794687MsoHyperlink {color:blue;text-decoration:underline;}#yiv6479794687 a:visited, #yiv6479794687 span.yiv6479794687MsoHyperlinkFollowed {color:purple;text-decoration:underline;}#yiv6479794687 p {margin-right:0cm;margin-left:0cm;font-size:12.0pt;font-family:"Times New Roman", serif;}#yiv6479794687 p.yiv6479794687msonormal0, #yiv6479794687 li.yiv6479794687msonormal0, #yiv6479794687 div.yiv6479794687msonormal0 {margin-right:0cm;margin-left:0cm;font-size:12.0pt;font-family:"Times New Roman", serif;}#yiv6479794687 span.yiv6479794687EmailStyle19 {font-family:"Calibri", sans-serif;color:#1F497D;}#yiv6479794687 span.yiv6479794687EmailStyle20 {font-family:"Calibri", sans-serif;color:#1F497D;}#yiv6479794687 .yiv6479794687MsoChpDefault {font-size:10.0pt;} _filtered #yiv6479794687 {margin:70.85pt 70.85pt 70.85pt 70.85pt;}#yiv6479794687 div.yiv6479794687WordSection1 {}#yiv6479794687 _filtered #yiv6479794687 {} _filtered #yiv6479794687 {} _filtered #yiv6479794687 {} _filtered #yiv6479794687 {} _filtered #yiv6479794687 {} _filtered #yiv6479794687 {} _filtered #yiv6479794687 {} _filtered #yiv6479794687 {} _filtered #yiv6479794687 {} _filtered #yiv6479794687 {} _filtered #yiv6479794687 {}#yiv6479794687 ol {margin-bottom:0cm;}#yiv6479794687 ul {margin-bottom:0cm;}-->Hello, The matching can’t be over the second column of the index since the predicate is upon a part of the value of the column.   In general, the matching predicates on the leading index columns are equal or IN predicates. The predicate that matches the final index column can be an equal, IN, NOT NULL, or range predicate (<, <=, >, >=, LIKE, or BETWEEN).   The predicate DATE(COL_B_TMS) = WS-COL-B is a kind of like predicate.   To have a matchcols = 4 you should define an index like the following :   CREATE INDEX IX_MY_TAB_02                      ON MY_TAB                     (COL_A ASC,                           DATE(COL_B_TMS) ASC,                 COL_C ASC,                           COL_D ASC);                         Best regards,   Eric Amiel Consultant Département Logiciels   [login to unmask email] Tél.        +33 (0)1 48 97 68 81  Mobile    +33 (0)6 40 57 96 98     Tour Galliéni 2  |  36 avenue du Général de Gaulle  |  93175 Bagnolet Cedex  |  FRANCE           De : CASTELLA jean-francois
Envoyé : mercredi 9 janvier 2019 13:48
À : AMIEL Eric <[login to unmask email]>
Objet : TR: [IDUGNA] - List Digest, Jan 08, 2019   Question ?   Jean-François Castella Mobile +33 672 967210 LinkedInlinkedin.com/in/jeff-castella     De : IDUG NA <[login to unmask email]>
Envoyé : mercredi 9 janvier 2019 08:03
À : [login to unmask email]
Objet : [IDUGNA] - List Digest, Jan 08, 2019   The following posts were made on Jan 08, 2019
- DB2 11 - Question on Index matching - (Ravikumar sri2001)
1. DB2 11 - Question on Index matching (Ravikumar sri2001) From: Ravikumar sri2001
Subject: DB2 11 - Question on Index matching Experts,   I have below query.   SELECT X_AMT FROM MY_TAB WHERE  COL_A = WS-COL-A           AND        DATE(COL_B_TMS) = WS-COL-B AND        COL_C = 'PRSRT '           AND        COLC_D = WS-COL-D   Index MY_IX is defined on the MY_TAB table as follows   COL_A CHAR(10) COL_B TIMESTAMP COL_C CHAR(8) COL_D CHAR(8)   Host variables are defined as follows   WS-COL-A    PIC X(10) WS-COL-B    PIC X(26) WS-COL-D   PIC X(08)    As per the PLAN_TABLE, MATCOLS is "2" for the above query. Can you please explain why it is not using the predicates on COL_C, COL_D for index matching ?   Note : We are using Db2 11   Thanks, Ravikumar     View Post Online |Respond Online | Respond Via Email | Respond Directly to User | Return to Top   View mailing list online  Start new thread via email   Unsubscribe from this mailing list   Manage your subscription  

This email has been sent to: [login to unmask email] ESAi has well-regarded tools for Fast Cloning, Buffer Pool Tuning, Log Analysis, TDM & more.
BCV4, BCV5, BPA4DB2, ULT4DB2... modern power tools to get the job done faster & easier than ever.
http://www.ESAIGroup.com/idug
Use of this email content is governed by the terms of service at:
http://www.idug.org/p/cm/ld/fid=2

Attachments

  • image001.png (3.3k)
  • image002.jpg (15.2k)