<?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: Multiple Select Statments or Internal Table in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/multiple-select-statments-or-internal-table/m-p/7104065#M1508889</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would suggest to use field symbols as it doesnt occupy memory and are faster. Also use read statement with binary search where ever applicable.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;while firing select queries ensure your fetch only required fields. &lt;/P&gt;&lt;P&gt;Also avoid into corresponding clause in your select statements&lt;/P&gt;&lt;P&gt;Ensure you either have primary index or secondary index for your select queries ( Do run ST05 to find out which query might take time )&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ensure you run SE30 runtime analysis while coding your program. Might help to reduce time.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also if possible create views and fetch data from the views would help for faster results.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sumit&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 18 Sep 2010 21:26:32 GMT</pubDate>
    <dc:creator>former_member193284</dc:creator>
    <dc:date>2010-09-18T21:26:32Z</dc:date>
    <item>
      <title>Multiple Select Statments or Internal Table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/multiple-select-statments-or-internal-table/m-p/7104061#M1508885</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am in the process of developing a new cube with a very complex transformation to load the cube.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The ABAP code that I am using has to do many select statements to multiple ODS structures as well as read from the cube being loaded to gather the previous week's data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My problem is time, I am loading on average 4.5 million records each week when I load this cube. On a similar cube with similar calculations but not as many I am getting run times of about 8 hours for completion. This is also on a DB2 database.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My question is this, is it faster to load an internal table for each data package that would be roughly 1.5 million records for the internal table or to do many select statements that drill down to a specific level that would identify a single record in the ODS but do this 1.5 million times.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So should I load an internal table and loop through that or should I do 1.5 million select statements that grab just the information needed?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We are looking to optimize this process because it currently will fail with timeouts because it is taking so long to run.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any help?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 01 Jul 2010 17:39:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/multiple-select-statments-or-internal-table/m-p/7104061#M1508885</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-07-01T17:39:19Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple Select Statments or Internal Table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/multiple-select-statments-or-internal-table/m-p/7104062#M1508886</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I would definitely go with the one select, multiple reads approach.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It is a best practice in BW transformations to read into an internal table in the start routine, and then read the internal table in each rule, and that's how I have achieved the best results. Just make sure that you have a fast access to the internal table, so define it as SORTED or HASHED.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rui Dantas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 01 Jul 2010 17:44:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/multiple-select-statments-or-internal-table/m-p/7104062#M1508886</guid>
      <dc:creator>Rui_Dantas</dc:creator>
      <dc:date>2010-07-01T17:44:56Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple Select Statments or Internal Table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/multiple-select-statments-or-internal-table/m-p/7104063#M1508887</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;So you think it would be best to define a Global internal table that is simply read by each of the parrellel data packages?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If we decide to go this route, what if we delete the line from the table after it has been read from the table as it will never be needed by two records. Would it be faster to leave it in and delete all at the end or would it be faster to delete each record, not sure if the table would "resort" each time or not.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 01 Jul 2010 17:47:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/multiple-select-statments-or-internal-table/m-p/7104063#M1508887</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-07-01T17:47:52Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple Select Statments or Internal Table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/multiple-select-statments-or-internal-table/m-p/7104064#M1508888</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you can define a unique key, use a hashed table: the access time will be constant, so I wouldn't bother deleting the used records (though I have never actually tried it; you can always test it and post the results... &lt;SPAN __jive_emoticon_name="wink"&gt;&lt;/SPAN&gt;  )&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 01 Jul 2010 17:55:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/multiple-select-statments-or-internal-table/m-p/7104064#M1508888</guid>
      <dc:creator>Rui_Dantas</dc:creator>
      <dc:date>2010-07-01T17:55:15Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple Select Statments or Internal Table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/multiple-select-statments-or-internal-table/m-p/7104065#M1508889</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would suggest to use field symbols as it doesnt occupy memory and are faster. Also use read statement with binary search where ever applicable.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;while firing select queries ensure your fetch only required fields. &lt;/P&gt;&lt;P&gt;Also avoid into corresponding clause in your select statements&lt;/P&gt;&lt;P&gt;Ensure you either have primary index or secondary index for your select queries ( Do run ST05 to find out which query might take time )&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ensure you run SE30 runtime analysis while coding your program. Might help to reduce time.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also if possible create views and fetch data from the views would help for faster results.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sumit&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 18 Sep 2010 21:26:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/multiple-select-statments-or-internal-table/m-p/7104065#M1508889</guid>
      <dc:creator>former_member193284</dc:creator>
      <dc:date>2010-09-18T21:26:32Z</dc:date>
    </item>
  </channel>
</rss>

