<?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 Improve min date efficiency in load script in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Improve-min-date-efficiency-in-load-script/m-p/1010980#M343042</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi There,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm hoping someone can assist me in improving a script I have running.&amp;nbsp; The idea is to get the start time for each till, which is the minimum transaction time.&amp;nbsp; The problem is that my source data contains many millions of rows, and the group by in TABLE2 takes a long time to complete.&amp;nbsp; Are there any alternatives I can try?&amp;nbsp; Any help would be greatly appreciated.&amp;nbsp; The below is my current code&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FOR each file in FileList('Myfilepath.qvd')&lt;/P&gt;&lt;P&gt;TABLE1&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;Branch,&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;Till,&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;Date,&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;Time&lt;/P&gt;&lt;P&gt;FROM&lt;/P&gt;&lt;P&gt;$(file) &lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;(qvd);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;NEXT&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TABLE2:&lt;/P&gt;&lt;P&gt;LEFT JOIN(TABLE1)&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;Branch,&lt;/P&gt;&lt;P&gt;Till,&lt;/P&gt;&lt;P&gt;Date,&lt;/P&gt;&lt;P&gt;TIME(MIN([Time])) as [Time]&lt;/P&gt;&lt;P&gt;Resident TABLE1&lt;/P&gt;&lt;P&gt;Group by &lt;SPAN style="font-size: 13.3333px;"&gt;Till&lt;/SPAN&gt;,&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Date&lt;/SPAN&gt;,&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Branch&lt;/SPAN&gt;;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 10 Sep 2015 09:19:06 GMT</pubDate>
    <dc:creator>nsm1234567</dc:creator>
    <dc:date>2015-09-10T09:19:06Z</dc:date>
    <item>
      <title>Improve min date efficiency in load script</title>
      <link>https://community.qlik.com/t5/QlikView/Improve-min-date-efficiency-in-load-script/m-p/1010980#M343042</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi There,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm hoping someone can assist me in improving a script I have running.&amp;nbsp; The idea is to get the start time for each till, which is the minimum transaction time.&amp;nbsp; The problem is that my source data contains many millions of rows, and the group by in TABLE2 takes a long time to complete.&amp;nbsp; Are there any alternatives I can try?&amp;nbsp; Any help would be greatly appreciated.&amp;nbsp; The below is my current code&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FOR each file in FileList('Myfilepath.qvd')&lt;/P&gt;&lt;P&gt;TABLE1&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;Branch,&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;Till,&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;Date,&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;Time&lt;/P&gt;&lt;P&gt;FROM&lt;/P&gt;&lt;P&gt;$(file) &lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;(qvd);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;NEXT&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TABLE2:&lt;/P&gt;&lt;P&gt;LEFT JOIN(TABLE1)&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;Branch,&lt;/P&gt;&lt;P&gt;Till,&lt;/P&gt;&lt;P&gt;Date,&lt;/P&gt;&lt;P&gt;TIME(MIN([Time])) as [Time]&lt;/P&gt;&lt;P&gt;Resident TABLE1&lt;/P&gt;&lt;P&gt;Group by &lt;SPAN style="font-size: 13.3333px;"&gt;Till&lt;/SPAN&gt;,&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Date&lt;/SPAN&gt;,&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Branch&lt;/SPAN&gt;;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Sep 2015 09:19:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Improve-min-date-efficiency-in-load-script/m-p/1010980#M343042</guid>
      <dc:creator>nsm1234567</dc:creator>
      <dc:date>2015-09-10T09:19:06Z</dc:date>
    </item>
    <item>
      <title>Re: Improve min date efficiency in load script</title>
      <link>https://community.qlik.com/t5/QlikView/Improve-min-date-efficiency-in-load-script/m-p/1010981#M343043</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;FOR each file in FileList('Myfilepath.qvd')&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp;&amp;nbsp; TABLE1:&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp;&amp;nbsp; LOAD&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;AutoNumber( Branch &amp;amp; '-' &amp;amp; Till &amp;amp; '-' &amp;amp; Date) AS %Key,&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Branch,&lt;/P&gt;&lt;P style="font-size: 13.3333px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Till,&lt;/P&gt;&lt;P style="font-size: 13.3333px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Date,&lt;/P&gt;&lt;P style="font-size: 13.3333px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Time&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp; FROM&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $(file) &lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: inherit;"&gt;(qvd);&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;NEXT&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;MIN_TABLE:&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;LOAD&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; AutoNumber( Branch &amp;amp; '-' &amp;amp; Till &amp;amp; '-' &amp;amp; Date) AS %Key,&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Min(Time) AS MinTime&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;RESIDENT TABLE1&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; GROUP BY Till,Date,Branch;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;So you effectively create yourself a Min Date dimension.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Sep 2015 10:37:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Improve-min-date-efficiency-in-load-script/m-p/1010981#M343043</guid>
      <dc:creator>petter</dc:creator>
      <dc:date>2015-09-10T10:37:42Z</dc:date>
    </item>
    <item>
      <title>Re: Improve min date efficiency in load script</title>
      <link>https://community.qlik.com/t5/QlikView/Improve-min-date-efficiency-in-load-script/m-p/1010982#M343044</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I suspect that it is not the Group By that is the problem - instead the Join most likely is. So, I would try not joining.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;FOR each file in FileList('Myfilepath.qvd')&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp;&amp;nbsp; TABLE1:&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp;&amp;nbsp; LOAD &lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Branch &amp;amp; '|' &amp;amp; Till &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&amp;amp; '|' &amp;amp;&lt;/SPAN&gt; Date as Key,&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Branch, Till, Date, Time &lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; FROM $(file) &lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: inherit;"&gt;(qvd); &lt;/SPAN&gt; &lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;NEXT&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;TABLE2:&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="line-height: 1.5em;"&gt;LOAD&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp;&amp;nbsp; Key,&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp;&amp;nbsp; TIME(MIN([Time])) as [Time]&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Resident TABLE1&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-size: 13px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Group by &lt;/SPAN&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Key&lt;/SPAN&gt;&lt;SPAN style="font-size: 13px;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;HIC&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Sep 2015 11:30:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Improve-min-date-efficiency-in-load-script/m-p/1010982#M343044</guid>
      <dc:creator>hic</dc:creator>
      <dc:date>2015-09-10T11:30:55Z</dc:date>
    </item>
  </channel>
</rss>

