<?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: optimizing the query in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/optimizing-the-query/m-p/3436814#M825315</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi &lt;/P&gt;&lt;P&gt;The first and foremost thing u need to care about is to take the all the key fields Of Billing document Header Table  vbrk (i.e. vbeln ) .This is the most common way to improve the performance  of SQL Query .There is another road is out .If u have no option to use the key fileds &lt;/P&gt;&lt;P&gt;Better to Create a secondary Index (like here sfakn ) though its a very bad habit. Next For the  Billing Document Item data Table always use the header  table references .Its the best way to tune the code.Though You are using here One of the key fileds vbeln but still another key field &lt;/P&gt;&lt;P&gt;is left though its quite good to use atleast one key field.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If usefull Exepecting Rewards !!!!!!!!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 18 Feb 2008 07:33:44 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-02-18T07:33:44Z</dc:date>
    <item>
      <title>optimizing the query</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/optimizing-the-query/m-p/3436812#M825313</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would like to know what would be alternate table or optimal way to make the following queries work in a more efficient manner.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1) select sfakn from vbrk into table tl_sfakn for all entries in tl_vbrp WHERE sfakn = tl_vbrp-vbeln.&lt;/P&gt;&lt;P&gt;2)   SELECT vbeln FROM vbrp INTO TABLE tl_vbrp  FOR ALL ENTRIES IN tl_vbap[]   WHERE vgbel = tl_vbap-vbeln.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;any help would be appreciated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks&lt;/P&gt;&lt;P&gt;vij&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 16 Feb 2008 19:01:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/optimizing-the-query/m-p/3436812#M825313</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-16T19:01:41Z</dc:date>
    </item>
    <item>
      <title>Re: optimizing the query</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/optimizing-the-query/m-p/3436813#M825314</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You'll get more answers if you mark this as a question.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You are not using indexes and I don't see any you can use, so run it in the background.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rob&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 16 Feb 2008 19:29:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/optimizing-the-query/m-p/3436813#M825314</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-16T19:29:43Z</dc:date>
    </item>
    <item>
      <title>Re: optimizing the query</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/optimizing-the-query/m-p/3436814#M825315</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi &lt;/P&gt;&lt;P&gt;The first and foremost thing u need to care about is to take the all the key fields Of Billing document Header Table  vbrk (i.e. vbeln ) .This is the most common way to improve the performance  of SQL Query .There is another road is out .If u have no option to use the key fileds &lt;/P&gt;&lt;P&gt;Better to Create a secondary Index (like here sfakn ) though its a very bad habit. Next For the  Billing Document Item data Table always use the header  table references .Its the best way to tune the code.Though You are using here One of the key fileds vbeln but still another key field &lt;/P&gt;&lt;P&gt;is left though its quite good to use atleast one key field.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If usefull Exepecting Rewards !!!!!!!!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Feb 2008 07:33:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/optimizing-the-query/m-p/3436814#M825315</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-18T07:33:44Z</dc:date>
    </item>
  </channel>
</rss>

