<?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: Why is Count() from a QVD file so Slow? in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Why-is-Count-from-a-QVD-file-so-Slow/m-p/588394#M680062</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Check out this thread: &lt;A _jive_internal="true" href="https://community.qlik.com/thread/46072"&gt;http://community.qlik.com/thread/46072&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 02 May 2014 10:59:50 GMT</pubDate>
    <dc:creator>sushil353</dc:creator>
    <dc:date>2014-05-02T10:59:50Z</dc:date>
    <item>
      <title>Why is Count() from a QVD file so Slow?</title>
      <link>https://community.qlik.com/t5/QlikView/Why-is-Count-from-a-QVD-file-so-Slow/m-p/588390#M680058</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a very large table (77 mil rows) stored as a QVD file, and I want to load some aggregated counts from this file for a particular application.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have found when I first load the table and then perform the count from the resulting resident table, it takes only 44 seconds total, which is quite decent:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;EM&gt;Data:&lt;/EM&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;EM&gt;donation_alerts:&lt;/EM&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;EM&gt;LOAD&amp;nbsp; date(floor(date)) as date,&lt;/EM&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; version&lt;/EM&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;EM&gt;FROM ..\Data\QVDs\data1.qvd (qvd);&lt;SPAN style="color: #ff0000;"&gt; (19 seconds)&lt;/SPAN&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;EM&gt;qualify *;&lt;/EM&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;EM&gt;Summary:&lt;/EM&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;EM&gt;LOAD date,&lt;/EM&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;EM&gt;&amp;nbsp; version,&lt;/EM&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;EM&gt;&amp;nbsp; count(version)&lt;/EM&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;EM&gt;Resident donation_alerts&lt;/EM&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;EM&gt;group by date, version; &lt;SPAN style="color: #ff0000;"&gt;(+25 seconds = 44 seconds total)&lt;/SPAN&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However, when I try the same in a single load statement, it runs much slower, taking 109 seconds:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;EM&gt;LOAD date(floor(date)),&lt;/EM&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;EM&gt;&amp;nbsp; version,&lt;/EM&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;EM&gt;&amp;nbsp; count(version)&lt;/EM&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;EM&gt;FROM ..\Data\QVDs\data1.qvd (qvd)&lt;/EM&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;EM&gt;group by date(floor(date)), version; &lt;/EM&gt;&lt;SPAN style="color: #ff0000;"&gt;&lt;EM&gt;(109 seconds)&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Or the intermediate option, which takes even longer at 126 seconds:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;EM&gt;LOAD date,&lt;/EM&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;EM&gt;&amp;nbsp; version,&lt;/EM&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;EM&gt;&amp;nbsp; count(version)&lt;/EM&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;EM&gt;group by date, version; &lt;/EM&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;EM&gt;LOAD&amp;nbsp; date(floor(date)) as date&lt;/EM&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; version&lt;/EM&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;EM&gt;FROM ..\Data\QVDs\data1.qvd (qvd); &lt;SPAN style="color: #ff0000;"&gt;(126 seconds)&lt;/SPAN&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I can live with the workaround but to me the second solution is cleanest and more logical, and is the method I naturally had tried first. I would like to understand why the second and third methods are so much slower so I can apply this to other cases to speed up loads. I am not not sure why the third option performs any differently from the first option.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Could the date transformation I'm doing have anything to do with it? Is it not performing an optimised load in one of the cases?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 May 2014 10:48:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Why-is-Count-from-a-QVD-file-so-Slow/m-p/588390#M680058</guid>
      <dc:creator />
      <dc:date>2014-05-02T10:48:58Z</dc:date>
    </item>
    <item>
      <title>Re: Why is Count() from a QVD file so Slow?</title>
      <link>https://community.qlik.com/t5/QlikView/Why-is-Count-from-a-QVD-file-so-Slow/m-p/588391#M680059</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;In the first option you have optimized QVD load which is faster and then you are calculation the count on data which is in memory.. so that is why you got lesser time..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But in second case QVD load is unoptimized.. due to which you are getting more time to execute.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;HTH&lt;/P&gt;&lt;P&gt;sushil&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 May 2014 10:52:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Why-is-Count-from-a-QVD-file-so-Slow/m-p/588391#M680059</guid>
      <dc:creator>sushil353</dc:creator>
      <dc:date>2014-05-02T10:52:28Z</dc:date>
    </item>
    <item>
      <title>Re: Why is Count() from a QVD file so Slow?</title>
      <link>https://community.qlik.com/t5/QlikView/Why-is-Count-from-a-QVD-file-so-Slow/m-p/588392#M680060</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks, I wondered if that was it, so it's still optimised even though I'm performing the data(floor(date)) transformation which is evaluated for every single row?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there any good documentation on optimised loads so I can get a better understand of them?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 May 2014 10:55:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Why-is-Count-from-a-QVD-file-so-Slow/m-p/588392#M680060</guid>
      <dc:creator />
      <dc:date>2014-05-02T10:55:54Z</dc:date>
    </item>
    <item>
      <title>Re: Why is Count() from a QVD file so Slow?</title>
      <link>https://community.qlik.com/t5/QlikView/Why-is-Count-from-a-QVD-file-so-Slow/m-p/588393#M680061</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Well, I think its non optimized. What does the document log says?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Have a look at&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/thread/31027"&gt;Turning Unoptimized Loads into Optimized Loads&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and the referenced blog.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 May 2014 10:58:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Why-is-Count-from-a-QVD-file-so-Slow/m-p/588393#M680061</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2014-05-02T10:58:57Z</dc:date>
    </item>
    <item>
      <title>Re: Why is Count() from a QVD file so Slow?</title>
      <link>https://community.qlik.com/t5/QlikView/Why-is-Count-from-a-QVD-file-so-Slow/m-p/588394#M680062</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Check out this thread: &lt;A _jive_internal="true" href="https://community.qlik.com/thread/46072"&gt;http://community.qlik.com/thread/46072&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 May 2014 10:59:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Why-is-Count-from-a-QVD-file-so-Slow/m-p/588394#M680062</guid>
      <dc:creator>sushil353</dc:creator>
      <dc:date>2014-05-02T10:59:50Z</dc:date>
    </item>
  </channel>
</rss>

