<?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 Data extract from huge table in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/data-extract-from-huge-table/m-p/6489661#M1420154</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 am extracting data from a table which has more than 25 million records without using any where condition.&lt;/P&gt;&lt;P&gt;45000 records in a file, in multiple files.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What is the best way to write the select statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;fract&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 20 Jan 2010 23:50:48 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2010-01-20T23:50:48Z</dc:date>
    <item>
      <title>Data extract from huge table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/data-extract-from-huge-table/m-p/6489661#M1420154</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 am extracting data from a table which has more than 25 million records without using any where condition.&lt;/P&gt;&lt;P&gt;45000 records in a file, in multiple files.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What is the best way to write the select statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;fract&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 Jan 2010 23:50:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/data-extract-from-huge-table/m-p/6489661#M1420154</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-01-20T23:50:48Z</dc:date>
    </item>
    <item>
      <title>Re: Data extract from huge table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/data-extract-from-huge-table/m-p/6489662#M1420155</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;SELECT UP TO 45000  ROWS&lt;/P&gt;&lt;P&gt;              INTO IT_TAB&lt;/P&gt;&lt;P&gt;              FROM &amp;lt;Table&amp;gt;&lt;/P&gt;&lt;P&gt;             .....&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Jan 2010 05:52:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/data-extract-from-huge-table/m-p/6489662#M1420155</guid>
      <dc:creator>former_member150733</dc:creator>
      <dc:date>2010-01-21T05:52:18Z</dc:date>
    </item>
    <item>
      <title>Re: Data extract from huge table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/data-extract-from-huge-table/m-p/6489663#M1420156</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;You can also use PACKAGE  concept as an addition to the select query. (please see F1 help on this syntax). You can specify the package size, and the system will fetch the record in those bunches.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;amit m.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Jan 2010 05:54:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/data-extract-from-huge-table/m-p/6489663#M1420156</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-01-21T05:54:33Z</dc:date>
    </item>
    <item>
      <title>Re: Data extract from huge table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/data-extract-from-huge-table/m-p/6489664#M1420157</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;Your should try to do analysis of your system and requirement to find the best approach.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also, you should proceed with runtime analysis and trace analysis of your program.Check which index is being used by select statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;you can try PACKAGE concept with the select query.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also, try to analyse the impact of the changes that you have made by comparing with previous results.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Search SDN on performance tuning , there are many good posts avaliable on this.&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;Edited by: Harsh Bhalla on Jan 21, 2010 11:35 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Jan 2010 06:04:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/data-extract-from-huge-table/m-p/6489664#M1420157</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-01-21T06:04:43Z</dc:date>
    </item>
    <item>
      <title>Re: Data extract from huge table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/data-extract-from-huge-table/m-p/6489665#M1420158</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;When writing into files till 1 million is ok. When it comes to more than 1 million, it is taking more time....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It writes first file from 1 to 45000. after writing the first file, for second file,  it comes to Select statement again and reads 90000 records but skips first 45000records. like this it is doing for all files....&lt;/P&gt;&lt;P&gt;second file 45001 to 90000&lt;/P&gt;&lt;P&gt;third file 90001 to 120,000&lt;/P&gt;&lt;P&gt;....&lt;/P&gt;&lt;P&gt;....&lt;/P&gt;&lt;P&gt;....&lt;/P&gt;&lt;P&gt;......&lt;/P&gt;&lt;P&gt;Select * from....&lt;/P&gt;&lt;P&gt; if sy-dbcnt &amp;gt; last_count_records.&lt;/P&gt;&lt;P&gt;  write into internal table.....&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;Endselect....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there any other way to improve performance.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Jan 2010 17:18:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/data-extract-from-huge-table/m-p/6489665#M1420158</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-01-21T17:18:53Z</dc:date>
    </item>
    <item>
      <title>Re: Data extract from huge table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/data-extract-from-huge-table/m-p/6489666#M1420159</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Don't know why you're extracting 25,000,000 records, but package size would be my first choice....something like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;types: gtyp_int type i.&lt;/P&gt;&lt;P&gt;data: itab type table of &amp;lt;dbtab&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;parameters: p_pkg type i default 45000.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;start-of-selection.&lt;/P&gt;&lt;P&gt;perform myform.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;form myform.&lt;/P&gt;&lt;P&gt; data: file_cnt type gtyp_int.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select * from &amp;lt;dbtab&amp;gt; into table &amp;lt;itab&amp;gt;&lt;/P&gt;&lt;P&gt; package size p_pkg.&lt;/P&gt;&lt;P&gt;  file_cnt = file_cnt + 1.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;do something with itab contents&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;case file_cnt.&lt;/P&gt;&lt;P&gt;  when 1.&lt;/P&gt;&lt;P&gt;     append lines of itab to ....  "or do a table copy.&lt;/P&gt;&lt;P&gt;when 2.&lt;/P&gt;&lt;P&gt;....&lt;/P&gt;&lt;P&gt;endcase.&lt;/P&gt;&lt;P&gt;endselect.&lt;/P&gt;&lt;P&gt;endform.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Jan 2010 18:08:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/data-extract-from-huge-table/m-p/6489666#M1420159</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-01-21T18:08:04Z</dc:date>
    </item>
    <item>
      <title>Re: Data extract from huge table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/data-extract-from-huge-table/m-p/6489667#M1420160</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What is the best method in the following two....I never used Open curosr, I don't know how it works. I heard that when we use "Open cursor", does it reads only one time the database and cache in application server? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Open cursor...... &lt;/P&gt;&lt;P&gt;(OR)&lt;/P&gt;&lt;P&gt;select * from &amp;lt;dbtab&amp;gt; into table &amp;lt;itab&amp;gt;&lt;/P&gt;&lt;P&gt;package size p_pkg.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 22 Jan 2010 14:24:13 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/data-extract-from-huge-table/m-p/6489667#M1420160</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-01-22T14:24:13Z</dc:date>
    </item>
    <item>
      <title>Re: Data extract from huge table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/data-extract-from-huge-table/m-p/6489668#M1420161</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Rather than saying what you "heard", why don't you just check the documentation?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rob&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 22 Jan 2010 14:39:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/data-extract-from-huge-table/m-p/6489668#M1420161</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-01-22T14:39:50Z</dc:date>
    </item>
  </channel>
</rss>

