<?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: Does COUNT_BIG only work with 64-bit version? in Technology Q&amp;A</title>
    <link>https://community.sap.com/t5/technology-q-a/does-count-big-only-work-with-64-bit-version/qaa-p/13840974#M4871817</link>
    <description>&lt;BLOCKQUOTE&gt;
&lt;P&gt;which seems to be the result of an 2^32 overflow.&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;That seems fitting to Breck's current observation, as the return type of COUNT_BIG() is still an int (checked with the freshest 12.0.1.3942 EBF):&lt;/P&gt;
&lt;P&gt;&lt;A href="http://sqlanywhere-forum.sap.com/questions/18368/count_big-is-delusional"&gt;COUNT_BIG(*) is delusional&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 19 Sep 2013 03:34:48 GMT</pubDate>
    <dc:creator>VolkerBarth</dc:creator>
    <dc:date>2013-09-19T03:34:48Z</dc:date>
    <item>
      <title>Does COUNT_BIG only work with 64-bit version?</title>
      <link>https://community.sap.com/t5/technology-q-a/does-count-big-only-work-with-64-bit-version/qaq-p/13840972</link>
      <description>&lt;P&gt;Here's what happens on the 32-bit version of SQL Anywhere Network Server Version 12.0.1.3298&lt;/P&gt;
&lt;PRE&gt;SELECT COUNT_BIG(*) 
  FROM SYSCOLUMN AS A 
       CROSS JOIN SYSCOLUMN AS B
       CROSS JOIN SYSCOLUMN AS C;

There was an error reading the results of the SQL statement.
The displayed results may be incorrect or incomplete.
Value SUM() out of range for destination
SQLCODE=-158, ODBC 3 State="22003"
&lt;/PRE&gt;</description>
      <pubDate>Tue, 13 Nov 2012 09:04:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/does-count-big-only-work-with-64-bit-version/qaq-p/13840972</guid>
      <dc:creator>Breck_Carter</dc:creator>
      <dc:date>2012-11-13T09:04:15Z</dc:date>
    </item>
    <item>
      <title>Re: Does COUNT_BIG only work with 64-bit version?</title>
      <link>https://community.sap.com/t5/technology-q-a/does-count-big-only-work-with-64-bit-version/qaa-p/13840973#M4871816</link>
      <description>&lt;P&gt;Hm, can't tell, that query really takes loooong for one of my test databases (too many columns?).&lt;/P&gt;
&lt;P&gt;However, the following simpler query returns no error but a wrong result in dbisqlc and DBISQL 12.0.1.3769:&lt;/P&gt;
&lt;DIV class="codehilite"&gt;&lt;PRE&gt;&lt;SPAN class="k"&gt;SELECT&lt;/SPAN&gt; &lt;SPAN class="n"&gt;COUNT_BIG&lt;/SPAN&gt;&lt;SPAN class="p"&gt;(&lt;/SPAN&gt;&lt;SPAN class="o"&gt;*&lt;/SPAN&gt;&lt;SPAN class="p"&gt;)&lt;/SPAN&gt; 
&lt;SPAN class="k"&gt;FROM&lt;/SPAN&gt; &lt;SPAN class="n"&gt;sa_rowgenerator&lt;/SPAN&gt;&lt;SPAN class="p"&gt;(&lt;/SPAN&gt;&lt;SPAN class="mi"&gt;1&lt;/SPAN&gt;&lt;SPAN class="p"&gt;,&lt;/SPAN&gt; &lt;SPAN class="mi"&gt;2048&lt;/SPAN&gt;&lt;SPAN class="p"&gt;)&lt;/SPAN&gt; &lt;SPAN class="k"&gt;AS&lt;/SPAN&gt; &lt;SPAN class="n"&gt;A&lt;/SPAN&gt;
   &lt;SPAN class="k"&gt;CROSS&lt;/SPAN&gt; &lt;SPAN class="k"&gt;JOIN&lt;/SPAN&gt; &lt;SPAN class="n"&gt;sa_rowgenerator&lt;/SPAN&gt;&lt;SPAN class="p"&gt;(&lt;/SPAN&gt;&lt;SPAN class="mi"&gt;1&lt;/SPAN&gt;&lt;SPAN class="p"&gt;,&lt;/SPAN&gt; &lt;SPAN class="mi"&gt;2048&lt;/SPAN&gt;&lt;SPAN class="p"&gt;)&lt;/SPAN&gt; &lt;SPAN class="k"&gt;AS&lt;/SPAN&gt; &lt;SPAN class="n"&gt;B&lt;/SPAN&gt; 
   &lt;SPAN class="k"&gt;CROSS&lt;/SPAN&gt; &lt;SPAN class="k"&gt;JOIN&lt;/SPAN&gt; &lt;SPAN class="n"&gt;sa_rowgenerator&lt;/SPAN&gt;&lt;SPAN class="p"&gt;(&lt;/SPAN&gt;&lt;SPAN class="mi"&gt;1&lt;/SPAN&gt;&lt;SPAN class="p"&gt;,&lt;/SPAN&gt; &lt;SPAN class="mi"&gt;2048&lt;/SPAN&gt;&lt;SPAN class="p"&gt;)&lt;/SPAN&gt; &lt;SPAN class="k"&gt;AS&lt;/SPAN&gt; &lt;SPAN class="k"&gt;C&lt;/SPAN&gt;&lt;SPAN class="p"&gt;;&lt;/SPAN&gt;
&lt;/PRE&gt;&lt;/DIV&gt;


&lt;P&gt;It should return 2^11 * 2^11 * 2^11 = 2^33 = 8,589,934,592 but returns (after quite a while...) 0, which seems to be the result of an 2^32 overflow.&lt;/P&gt;
&lt;P&gt;However, that query seems to be running one one thread, whereas your COUNT_BIG() query over SYSCOLUMN seems to be running parallel, which might make a difference as to the underlying query execution...&lt;/P&gt;</description>
      <pubDate>Tue, 13 Nov 2012 10:21:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/does-count-big-only-work-with-64-bit-version/qaa-p/13840973#M4871816</guid>
      <dc:creator>VolkerBarth</dc:creator>
      <dc:date>2012-11-13T10:21:22Z</dc:date>
    </item>
    <item>
      <title>Re: Does COUNT_BIG only work with 64-bit version?</title>
      <link>https://community.sap.com/t5/technology-q-a/does-count-big-only-work-with-64-bit-version/qaa-p/13840974#M4871817</link>
      <description>&lt;BLOCKQUOTE&gt;
&lt;P&gt;which seems to be the result of an 2^32 overflow.&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;That seems fitting to Breck's current observation, as the return type of COUNT_BIG() is still an int (checked with the freshest 12.0.1.3942 EBF):&lt;/P&gt;
&lt;P&gt;&lt;A href="http://sqlanywhere-forum.sap.com/questions/18368/count_big-is-delusional"&gt;COUNT_BIG(*) is delusional&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 19 Sep 2013 03:34:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/does-count-big-only-work-with-64-bit-version/qaa-p/13840974#M4871817</guid>
      <dc:creator>VolkerBarth</dc:creator>
      <dc:date>2013-09-19T03:34:48Z</dc:date>
    </item>
  </channel>
</rss>

