<?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>Question Re: Exchange operator in Technology Q&amp;A</title>
    <link>https://community.sap.com/t5/technology-q-a/exchange-operator/qaa-p/13826554#M4857397</link>
    <description>&lt;P&gt;&amp;gt; On ASE&lt;/P&gt;
&lt;P&gt;Of course, if you &lt;STRONG&gt;really&lt;/STRONG&gt; want to apply ASE advice to SQL Anywhere, here's an exhortation that might apply: &lt;A href="https://wiki.scn.sap.com/wiki/download/attachments/379553293/ASE%20Optimizer%20Best%20Practices.pdf"&gt;&lt;B&gt;"Since&amp;nbsp;serial&amp;nbsp;processing&amp;nbsp;is&amp;nbsp;more&amp;nbsp;resource‐efficient&amp;nbsp;than&amp;nbsp;parallel&amp;nbsp;processing,&amp;nbsp; avoiding&amp;nbsp;parallelism&amp;nbsp;may&amp;nbsp;allow&amp;nbsp;you&amp;nbsp;to&amp;nbsp;deliver&amp;nbsp;better&amp;nbsp;overall&amp;nbsp;performance&amp;nbsp;with&amp;nbsp;the&amp;nbsp;same&amp;nbsp;hardware."&lt;/B&gt;&lt;/A&gt;.&lt;/P&gt;</description>
    <pubDate>Tue, 06 Apr 2021 12:03:55 GMT</pubDate>
    <dc:creator>Breck_Carter</dc:creator>
    <dc:date>2021-04-06T12:03:55Z</dc:date>
    <item>
      <title>Exchange operator</title>
      <link>https://community.sap.com/t5/technology-q-a/exchange-operator/qaq-p/13826544</link>
      <description>&lt;P&gt;The query plan contains an Exchange operator for intra-query parallelism. Whose effect is to merge (union) the results of the parallel computation of each subtree. In our situation seven subtrees will be executed in parallel. All of them are using exact the same tables. &lt;/P&gt;
&lt;P&gt;If they are executed in parallel: Does the cache containing the same set of pages seven times - one set of the necessary pages for each subtree? Or does the cache containing one set of pages that is used for all seven subtrees?&lt;/P&gt;
&lt;P&gt;If seven sets exists - the query will monopolize the cache during the execution.&lt;/P&gt;
&lt;P&gt;Thanks&lt;/P&gt;
&lt;P&gt;Robert&lt;/P&gt;</description>
      <pubDate>Fri, 02 Apr 2021 03:55:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/exchange-operator/qaq-p/13826544</guid>
      <dc:creator>robert_kratschmann</dc:creator>
      <dc:date>2021-04-02T03:55:09Z</dc:date>
    </item>
    <item>
      <title>Re: Exchange operator</title>
      <link>https://community.sap.com/t5/technology-q-a/exchange-operator/qaa-p/13826545#M4857388</link>
      <description>&lt;P&gt;May I ask you, what does "monopolize the cache" might mean for you?&lt;/P&gt;</description>
      <pubDate>Sat, 03 Apr 2021 15:27:13 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/exchange-operator/qaa-p/13826545#M4857388</guid>
      <dc:creator>Vlad</dc:creator>
      <dc:date>2021-04-03T15:27:13Z</dc:date>
    </item>
    <item>
      <title>Re: Exchange operator</title>
      <link>https://community.sap.com/t5/technology-q-a/exchange-operator/qaa-p/13826546#M4857389</link>
      <description>&lt;P&gt;Monopolizing means that a large query will overwrite the entire cache with its required pages. All subsequent queries must reload their pages from disk into the cache. This means normaly that the following queries are slow.&lt;/P&gt;</description>
      <pubDate>Sun, 04 Apr 2021 08:34:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/exchange-operator/qaa-p/13826546#M4857389</guid>
      <dc:creator>robert_kratschmann</dc:creator>
      <dc:date>2021-04-04T08:34:35Z</dc:date>
    </item>
    <item>
      <title>Re: Exchange operator</title>
      <link>https://community.sap.com/t5/technology-q-a/exchange-operator/qaa-p/13826547#M4857390</link>
      <description>&lt;P&gt;I don't know about "cache monopolization" w.r.t. intra-query parallelism - but AFAIK cache pages are not "linked" to particular threads but can be shared between requests. So I would assume the database server would &lt;EM&gt;not&lt;/EM&gt; need to multiply pages for parallel access.&lt;/P&gt;</description>
      <pubDate>Tue, 06 Apr 2021 04:17:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/exchange-operator/qaa-p/13826547#M4857390</guid>
      <dc:creator>VolkerBarth</dc:creator>
      <dc:date>2021-04-06T04:17:28Z</dc:date>
    </item>
    <item>
      <title>Re: Exchange operator</title>
      <link>https://community.sap.com/t5/technology-q-a/exchange-operator/qaa-p/13826548#M4857391</link>
      <description>&lt;P&gt;If you are asking "Did this guy build SQL Anywhere?" the answer is no.&lt;/P&gt;
&lt;P&gt;&lt;IMG width="200" src="https://toonclips.com/600/cartoon-dumb-guy-with-a-bag-of-hammers-by-toonaday-67227.jpg" /&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 06 Apr 2021 06:52:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/exchange-operator/qaa-p/13826548#M4857391</guid>
      <dc:creator>Breck_Carter</dc:creator>
      <dc:date>2021-04-06T06:52:37Z</dc:date>
    </item>
    <item>
      <title>Re: Exchange operator</title>
      <link>https://community.sap.com/t5/technology-q-a/exchange-operator/qaa-p/13826549#M4857392</link>
      <description>&lt;P&gt;If you have an actual performance problem, feel free to ask questions about it.&lt;/P&gt;
&lt;P&gt;If you have evidence of bad behavior on the part of SQL Anywhere, PLEASE ASK QUESTIONS ABOUT IT (shouting intended, because everyone is interested in performance)&lt;/P&gt;
&lt;P&gt;The important word is "evidence" which is different from "speculation".&lt;/P&gt;
&lt;P&gt;FWIW there is no shortage of evidence that intra-query parallelism can cause HORRENDOUS performance problems on busy transactional databases, but this is the first time I've heard cache monopolization mentioned.&lt;/P&gt;
&lt;P&gt;Of course, cache monopolization COULD be a thing, I wouldn't know, I'm that guy with the sack of hammers &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 06 Apr 2021 07:14:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/exchange-operator/qaa-p/13826549#M4857392</guid>
      <dc:creator>Breck_Carter</dc:creator>
      <dc:date>2021-04-06T07:14:20Z</dc:date>
    </item>
    <item>
      <title>Re: Exchange operator</title>
      <link>https://community.sap.com/t5/technology-q-a/exchange-operator/qaa-p/13826550#M4857393</link>
      <description>&lt;P&gt;On the subject of evidence, the Graphical Plan With Statistics shows a lot of information about cache-versus-disk usage, so that feature could be used to study the effect of intra-query parallelism on cache usage by other connections. I suggest using GRAPHICAL_PLAN() calls because that gives complete control over the experimental setup... it shouldn't take too much work, probably no more than a few weeks &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 06 Apr 2021 07:26:24 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/exchange-operator/qaa-p/13826550#M4857393</guid>
      <dc:creator>Breck_Carter</dc:creator>
      <dc:date>2021-04-06T07:26:24Z</dc:date>
    </item>
    <item>
      <title>Re: Exchange operator</title>
      <link>https://community.sap.com/t5/technology-q-a/exchange-operator/qaa-p/13826551#M4857394</link>
      <description>&lt;P&gt;We are changing max_query_tasks from 0 to 8. This leads to a smaller cpu load (from 70-90% to 30-50%) and the Unscheduled Requests at a time are going down from 20 to 2-3.&lt;/P&gt;
&lt;P&gt;My idea was that with the original setting individual queries are taking a lot of the available cache. On ASE I know what to do if a query takes the whole cache. These setting (sp_cachestrategy) didn’t exist in SQL Anywhere. So, I’m interested if the possibility of taking the whole cache by an individual query exists in SQL Anywhere too.&lt;/P&gt;</description>
      <pubDate>Tue, 06 Apr 2021 11:12:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/exchange-operator/qaa-p/13826551#M4857394</guid>
      <dc:creator>robert_kratschmann</dc:creator>
      <dc:date>2021-04-06T11:12:29Z</dc:date>
    </item>
    <item>
      <title>Re: Exchange operator</title>
      <link>https://community.sap.com/t5/technology-q-a/exchange-operator/qaa-p/13826552#M4857395</link>
      <description>&lt;BLOCKQUOTE&gt;
&lt;P&gt;We are changing max_query_tasks from 0 to 8.&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Hm, value 0 means "unlimited" intra-query parallelism - so I'm surprised that the behaviour does change - unless your database server does use more than 8 logical processors, so "8" does impose a limit here.&lt;/P&gt;</description>
      <pubDate>Tue, 06 Apr 2021 11:34:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/exchange-operator/qaa-p/13826552#M4857395</guid>
      <dc:creator>VolkerBarth</dc:creator>
      <dc:date>2021-04-06T11:34:32Z</dc:date>
    </item>
    <item>
      <title>Re: Exchange operator</title>
      <link>https://community.sap.com/t5/technology-q-a/exchange-operator/qaa-p/13826553#M4857396</link>
      <description>&lt;P&gt;&amp;gt; On ASE&lt;/P&gt;
&lt;P&gt;You will have nothing but trouble if you apply &lt;B&gt;any&lt;/B&gt; of the complex ASE performance tuning techniques to SQL Anywhere... in other words, try to forget everything you learned about ASE. The same applies to Oracle, DB2, and all the other products that require manual tuning that SQL Anywhere does for you.&lt;/P&gt;
&lt;P&gt;Questions: Is your database used for a heavy multi-user update transaction workload? Are the queries which benefit from intra-query parallelism part of that workload, or are they part of a different "business intelligence" reporting workload? If the answer is "yes" to both then try setting max_query_tasks to 1. If the BI queries slow down too much then move them to another physical database, or run them overnight, or try max_query_tasks = 2 etcetera.&lt;/P&gt;</description>
      <pubDate>Tue, 06 Apr 2021 11:47:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/exchange-operator/qaa-p/13826553#M4857396</guid>
      <dc:creator>Breck_Carter</dc:creator>
      <dc:date>2021-04-06T11:47:01Z</dc:date>
    </item>
    <item>
      <title>Re: Exchange operator</title>
      <link>https://community.sap.com/t5/technology-q-a/exchange-operator/qaa-p/13826554#M4857397</link>
      <description>&lt;P&gt;&amp;gt; On ASE&lt;/P&gt;
&lt;P&gt;Of course, if you &lt;STRONG&gt;really&lt;/STRONG&gt; want to apply ASE advice to SQL Anywhere, here's an exhortation that might apply: &lt;A href="https://wiki.scn.sap.com/wiki/download/attachments/379553293/ASE%20Optimizer%20Best%20Practices.pdf"&gt;&lt;B&gt;"Since&amp;nbsp;serial&amp;nbsp;processing&amp;nbsp;is&amp;nbsp;more&amp;nbsp;resource‐efficient&amp;nbsp;than&amp;nbsp;parallel&amp;nbsp;processing,&amp;nbsp; avoiding&amp;nbsp;parallelism&amp;nbsp;may&amp;nbsp;allow&amp;nbsp;you&amp;nbsp;to&amp;nbsp;deliver&amp;nbsp;better&amp;nbsp;overall&amp;nbsp;performance&amp;nbsp;with&amp;nbsp;the&amp;nbsp;same&amp;nbsp;hardware."&lt;/B&gt;&lt;/A&gt;.&lt;/P&gt;</description>
      <pubDate>Tue, 06 Apr 2021 12:03:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/exchange-operator/qaa-p/13826554#M4857397</guid>
      <dc:creator>Breck_Carter</dc:creator>
      <dc:date>2021-04-06T12:03:55Z</dc:date>
    </item>
    <item>
      <title>Re: Exchange operator</title>
      <link>https://community.sap.com/t5/technology-q-a/exchange-operator/qaa-p/13826555#M4857398</link>
      <description>&lt;P&gt;&amp;gt; so "8" does impose a limit here&lt;/P&gt;
&lt;P&gt;Yup, that be my guess too &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;( wait, are you still using eight processors? all the Cool Kids are using way more! &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&lt;IMG width="200" src="http://www.ifdcouncil.org/wp-content/uploads/2014/08/Cool-Kids.jpg" /&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 06 Apr 2021 12:07:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/exchange-operator/qaa-p/13826555#M4857398</guid>
      <dc:creator>Breck_Carter</dc:creator>
      <dc:date>2021-04-06T12:07:39Z</dc:date>
    </item>
    <item>
      <title>Re: Exchange operator</title>
      <link>https://community.sap.com/t5/technology-q-a/exchange-operator/qaa-p/13826556#M4857399</link>
      <description>&lt;P&gt;The machine has 16 cores and two threads per core. So it really reduces the number of tasks per query 8.&lt;/P&gt;</description>
      <pubDate>Wed, 07 Apr 2021 10:48:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/exchange-operator/qaa-p/13826556#M4857399</guid>
      <dc:creator>robert_kratschmann</dc:creator>
      <dc:date>2021-04-07T10:48:42Z</dc:date>
    </item>
    <item>
      <title>Re: Exchange operator</title>
      <link>https://community.sap.com/t5/technology-q-a/exchange-operator/qaa-p/13826557#M4857400</link>
      <description>&lt;P&gt;No, I don't want to implement ASEs techniques to SA17. &lt;/P&gt;
&lt;P&gt;I had such a problem with a query taking most of the cache on ASE and sp_cachestrategy solved the problem...&lt;/P&gt;</description>
      <pubDate>Wed, 07 Apr 2021 10:51:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/exchange-operator/qaa-p/13826557#M4857400</guid>
      <dc:creator>robert_kratschmann</dc:creator>
      <dc:date>2021-04-07T10:51:21Z</dc:date>
    </item>
  </channel>
</rss>

