<?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: Performance issue with select query in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue-with-select-query/m-p/2974013#M701958</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Give the fields in the where condition in the sames sequence as present in the database. Also the fields which are selected should be in the same sequence as present in the database.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try creating an index on the table based on the query if advisable.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Abhishek&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 25 Oct 2007 21:55:10 GMT</pubDate>
    <dc:creator>former_member195698</dc:creator>
    <dc:date>2007-10-25T21:55:10Z</dc:date>
    <item>
      <title>Performance issue with select query</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue-with-select-query/m-p/2974010#M701955</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 have a performance issue with below query...its taking lots of time to execute.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;********************************&lt;/P&gt;&lt;P&gt;We have a selection screen with Idoc creation date field only, so screen should allow user the enter startdate and end date of idoc received.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  SELECT docnum status direct credat mestyp idoctp&lt;/P&gt;&lt;P&gt;          FROM edidc&lt;/P&gt;&lt;P&gt;                 INTO CORRESPONDING FIELDS OF TABLE i_edidc&lt;/P&gt;&lt;P&gt;                 WHERE status = '53' AND&lt;/P&gt;&lt;P&gt;                       direct = '2' AND&lt;/P&gt;&lt;P&gt;                       credat IN s_credat  AND&lt;/P&gt;&lt;P&gt;                       mestyp = 'CREMAS'  AND&lt;/P&gt;&lt;P&gt;                       idoctp = 'CREMAS03'.&lt;/P&gt;&lt;P&gt;*******************************************&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Pls review and suggest me, how we can improve the performance.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 Oct 2007 06:11:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue-with-select-query/m-p/2974010#M701955</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-25T06:11:01Z</dc:date>
    </item>
    <item>
      <title>Re: Performance issue with select query</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue-with-select-query/m-p/2974011#M701956</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;How many values are there in s_credat?&lt;/P&gt;&lt;P&gt;The performance could be affected if there are lot number of records in s_credat.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 Oct 2007 06:34:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue-with-select-query/m-p/2974011#M701956</guid>
      <dc:creator>Sathish</dc:creator>
      <dc:date>2007-10-25T06:34:11Z</dc:date>
    </item>
    <item>
      <title>Re: Performance issue with select query</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue-with-select-query/m-p/2974012#M701957</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Here r some advices:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1- IF u use one IN statment in the where clause, use all IN. Put the "hardcoded" Values in the s_option-low field.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2- Try not to use CORRESPONDING FIELDS OF. Instead Declare i_edidc like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: Begin of i_edidc occurs 0,&lt;/P&gt;&lt;P&gt;      docnum TYPE edidc-docnum,&lt;/P&gt;&lt;P&gt;      status TYPE edidc-status,  &lt;/P&gt;&lt;P&gt;      vdirect TYPE edidc-vdirect,&lt;/P&gt;&lt;P&gt;      credat TYPE edidc-credat,&lt;/P&gt;&lt;P&gt;      mestyp TYPE edidc-mestyp,&lt;/P&gt;&lt;P&gt;      idoctp TYPE edidc-idoctp,  &lt;/P&gt;&lt;P&gt; END OF i_edidc.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And use INTO TABLE i_edidc&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT docnum status direct credat mestyp idoctp&lt;/P&gt;&lt;P&gt;FROM edidc&lt;/P&gt;&lt;P&gt;INTO TABLE i_edidc&lt;/P&gt;&lt;P&gt;WHERE status IN s_status AND&lt;/P&gt;&lt;P&gt;direct IN s_direct AND&lt;/P&gt;&lt;P&gt;credat IN s_credat AND&lt;/P&gt;&lt;P&gt;mestyp IN s_mestyp AND&lt;/P&gt;&lt;P&gt;idoctp IN s_idoctp.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 Oct 2007 20:29:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue-with-select-query/m-p/2974012#M701957</guid>
      <dc:creator>Rodrigo-Giner</dc:creator>
      <dc:date>2007-10-25T20:29:48Z</dc:date>
    </item>
    <item>
      <title>Re: Performance issue with select query</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue-with-select-query/m-p/2974013#M701958</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Give the fields in the where condition in the sames sequence as present in the database. Also the fields which are selected should be in the same sequence as present in the database.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try creating an index on the table based on the query if advisable.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Abhishek&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 Oct 2007 21:55:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue-with-select-query/m-p/2974013#M701958</guid>
      <dc:creator>former_member195698</dc:creator>
      <dc:date>2007-10-25T21:55:10Z</dc:date>
    </item>
  </channel>
</rss>

