<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: DB2 Index Hint Syntax in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/db2-index-hint-syntax/m-p/6532445#M1426748</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Dave,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the hint mentioned by Martin is an ORACLE hint and not a DB2 hint.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For DB2 you need a so called CTE hint which is not mentioned in note 162034.&lt;/P&gt;&lt;P&gt;Get in contact with your database administrator in order to check:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- if the index and statistics are in place&lt;/P&gt;&lt;P&gt;- if the parameters for the database are set up according to the recomendations&lt;/P&gt;&lt;P&gt;- if the system is setup in a way that supports CTE hints&lt;/P&gt;&lt;P&gt;- how the CTE hint syntax for specifying an index looks like&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kind regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hermann&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 07 Jan 2010 12:58:05 GMT</pubDate>
    <dc:creator>HermannGahm</dc:creator>
    <dc:date>2010-01-07T12:58:05Z</dc:date>
    <item>
      <title>DB2 Index Hint Syntax</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/db2-index-hint-syntax/m-p/6532439#M1426742</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I want to force DB2 to utilize a particular table index.  Beyond the "Use values for optimization", etc. hints, is there a way to point to a specific index in Open SQL select in a DB2 (release 8.1.5) system?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Jan 2010 15:45:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/db2-index-hint-syntax/m-p/6532439#M1426742</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-01-06T15:45:26Z</dc:date>
    </item>
    <item>
      <title>Re: DB2 Index Hint Syntax</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/db2-index-hint-syntax/m-p/6532440#M1426743</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Dave , &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ya there is way , we use Something with select statement , %HINT , press F1 and check.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps you.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Jan 2010 16:08:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/db2-index-hint-syntax/m-p/6532440#M1426743</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-01-06T16:08:04Z</dc:date>
    </item>
    <item>
      <title>Re: DB2 Index Hint Syntax</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/db2-index-hint-syntax/m-p/6532441#M1426744</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;as it was mentioned you can use pass hints with your SQL query. The keyword is %_HINTS. You can put something similar after your WHERE conditions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
WHERE &amp;lt;conditions&amp;gt;
%_HINTS DB2 'INDEX(&amp;amp;quot;VBRK&amp;amp;quot; &amp;amp;quot;VBRK~0&amp;amp;quot;)'
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Search here on SDN for some additional examples. Also have a look at very useful OSS note 129385.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Jan 2010 22:59:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/db2-index-hint-syntax/m-p/6532441#M1426744</guid>
      <dc:creator>mvoros</dc:creator>
      <dc:date>2010-01-06T22:59:34Z</dc:date>
    </item>
    <item>
      <title>Re: DB2 Index Hint Syntax</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/db2-index-hint-syntax/m-p/6532442#M1426745</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;there is on OSS note which you should know: 129385&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;That is the general hint, from that one you should find a note for your database release.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Jan 2010 08:29:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/db2-index-hint-syntax/m-p/6532442#M1426745</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-01-07T08:29:37Z</dc:date>
    </item>
    <item>
      <title>Re: DB2 Index Hint Syntax</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/db2-index-hint-syntax/m-p/6532443#M1426746</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks, Martin and Seigfreid.  I have read a variety of notes on this subject.  I tried the specific hint, and I'm disappointed to see that the optimizer still grabs the secondary index I'm trying to avoid.  I'll investigate DB2 system settings; perhaps hints are not allowed in our environment.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Jan 2010 12:04:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/db2-index-hint-syntax/m-p/6532443#M1426746</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-01-07T12:04:12Z</dc:date>
    </item>
    <item>
      <title>Re: DB2 Index Hint Syntax</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/db2-index-hint-syntax/m-p/6532444#M1426747</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I simple test use SE16 and in parallel ST05, select exactly one line by a selection which specifies the exactöly the fields of the index (primary or secondary). Check ST05, which index is used, be aware the MSSQL and SAP DB will use the primary key additionally.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here you secondary key should be used, otherwise there is probably a problem with the index, only defined not built on the database or no statistics available.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If this check is o.k., but your hint does not work, then you should check very carefully the writing, there is no syntax check, small bugs can easily be overlooked.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Siegfried&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Jan 2010 12:23:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/db2-index-hint-syntax/m-p/6532444#M1426747</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-01-07T12:23:58Z</dc:date>
    </item>
    <item>
      <title>Re: DB2 Index Hint Syntax</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/db2-index-hint-syntax/m-p/6532445#M1426748</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Dave,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the hint mentioned by Martin is an ORACLE hint and not a DB2 hint.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For DB2 you need a so called CTE hint which is not mentioned in note 162034.&lt;/P&gt;&lt;P&gt;Get in contact with your database administrator in order to check:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- if the index and statistics are in place&lt;/P&gt;&lt;P&gt;- if the parameters for the database are set up according to the recomendations&lt;/P&gt;&lt;P&gt;- if the system is setup in a way that supports CTE hints&lt;/P&gt;&lt;P&gt;- how the CTE hint syntax for specifying an index looks like&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kind regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hermann&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Jan 2010 12:58:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/db2-index-hint-syntax/m-p/6532445#M1426748</guid>
      <dc:creator>HermannGahm</dc:creator>
      <dc:date>2010-01-07T12:58:05Z</dc:date>
    </item>
  </channel>
</rss>

