<?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: Particular SQL Query taking higher time when run in background in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/particular-sql-query-taking-higher-time-when-run-in-background/m-p/10821840#M1882965</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Richa,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Yes, you are right but the query is returning the result in 3 minutes for every run. I mean no matter whenever we fire that query the time taken is same.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So there is some issue/lag which is always happening. Do you think it is DATABASE level issue.?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Saransh Walia&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 20 Jan 2015 06:48:17 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2015-01-20T06:48:17Z</dc:date>
    <item>
      <title>Particular SQL Query taking higher time when run in background</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/particular-sql-query-taking-higher-time-when-run-in-background/m-p/10821836#M1882961</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 facing an issue from below SQL query.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SQL Query -&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; SELECT spras prodh vtext&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; FROM t179t&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; INTO TABLE&amp;nbsp; i_t179t&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; FOR ALL ENTRIES IN hierarchy_table&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; WHERE ( spras = c_english OR spras = v_spras )&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; AND prodh = hierarchy_table-hierarchy.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;hierarchy_table has around 1000 records and t179t has 680,000 records. i_t179t will have 1000 records as a result.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now this query is taking around 2 seconds when run in dialog mode, but when the same is run in background it takes around 3 minutes.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Performance traces and SM66 shows confirms that this is the only query which is taking such a long time and affecting performance.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 Jan 2015 09:44:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/particular-sql-query-taking-higher-time-when-run-in-background/m-p/10821836#M1882961</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2015-01-19T09:44:55Z</dc:date>
    </item>
    <item>
      <title>Re: Particular SQL Query taking higher time when run in background</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/particular-sql-query-taking-higher-time-when-run-in-background/m-p/10821837#M1882962</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Saransh,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For better performance, you can use joins on your tables.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; Regards&lt;/P&gt;&lt;P&gt;Richa&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 Jan 2015 12:16:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/particular-sql-query-taking-higher-time-when-run-in-background/m-p/10821837#M1882962</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2015-01-19T12:16:14Z</dc:date>
    </item>
    <item>
      <title>Re: Particular SQL Query taking higher time when run in background</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/particular-sql-query-taking-higher-time-when-run-in-background/m-p/10821838#M1882963</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Richa,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But I only have a single table from which data needs to fetched. The problem is why there is so much time difference between Dialog and background mode.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Saransh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 Jan 2015 12:36:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/particular-sql-query-taking-higher-time-when-run-in-background/m-p/10821838#M1882963</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2015-01-19T12:36:58Z</dc:date>
    </item>
    <item>
      <title>Re: Particular SQL Query taking higher time when run in background</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/particular-sql-query-taking-higher-time-when-run-in-background/m-p/10821839#M1882964</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Saransh,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Generally, background jobs are slower than the dialog mode processes.&lt;/P&gt;&lt;P&gt;Plus it also depends upon the number of background jobs running at that point of time.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; Regards&lt;/P&gt;&lt;P&gt;Richa&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Jan 2015 05:33:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/particular-sql-query-taking-higher-time-when-run-in-background/m-p/10821839#M1882964</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2015-01-20T05:33:48Z</dc:date>
    </item>
    <item>
      <title>Re: Particular SQL Query taking higher time when run in background</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/particular-sql-query-taking-higher-time-when-run-in-background/m-p/10821840#M1882965</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Richa,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Yes, you are right but the query is returning the result in 3 minutes for every run. I mean no matter whenever we fire that query the time taken is same.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So there is some issue/lag which is always happening. Do you think it is DATABASE level issue.?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Saransh Walia&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Jan 2015 06:48:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/particular-sql-query-taking-higher-time-when-run-in-background/m-p/10821840#M1882965</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2015-01-20T06:48:17Z</dc:date>
    </item>
    <item>
      <title>Re: Particular SQL Query taking higher time when run in background</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/particular-sql-query-taking-higher-time-when-run-in-background/m-p/10821841#M1882966</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;Try to avoid OR condition it implies that the query is being executed twice.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Vinodkumar.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Jan 2015 09:25:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/particular-sql-query-taking-higher-time-when-run-in-background/m-p/10821841#M1882966</guid>
      <dc:creator>vinodkumar_thangavel</dc:creator>
      <dc:date>2015-01-20T09:25:19Z</dc:date>
    </item>
    <item>
      <title>Re: Particular SQL Query taking higher time when run in background</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/particular-sql-query-taking-higher-time-when-run-in-background/m-p/10821842#M1882967</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Saransh,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There can be 3 main for the performance issue in case of Dialog and background mode:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When the job is scheduled&amp;nbsp; for the background process, it&amp;nbsp; waits for the planned execution time in the job scheduling table. &lt;/P&gt;&lt;P&gt;If the time has come and free background work processes are available, the job is distributed to a background work process by the background scheduler and then executed.&lt;/P&gt;&lt;P&gt;Time is spent in this process whereas the same thing doesn't happen in case of dialog mode.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Second main reason is Dialog processes work with a shared memory segment (extended memory). Background processes have their private heap memory.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And the Third reason can be the database parameter which might need tuning for the performance optimization.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Jan 2015 10:59:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/particular-sql-query-taking-higher-time-when-run-in-background/m-p/10821842#M1882967</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2015-01-20T10:59:18Z</dc:date>
    </item>
    <item>
      <title>Re: Particular SQL Query taking higher time when run in background</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/particular-sql-query-taking-higher-time-when-run-in-background/m-p/10821843#M1882968</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Vinod,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Yes, that worked. Thanks.&lt;SPAN __jive_emoticon_name="happy" __jive_macro_name="emoticon" class="jive_macro_emoticon jive_macro jive_emote" src="https://community.sap.com/1103/images/emoticons/happy.gif"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Saransh Walia&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Jan 2015 11:34:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/particular-sql-query-taking-higher-time-when-run-in-background/m-p/10821843#M1882968</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2015-01-20T11:34:06Z</dc:date>
    </item>
  </channel>
</rss>

