<?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: max(date) from a table with a billion rows in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/max-date-from-a-table-with-a-billion-rows/m-p/2114109#M90952</link>
    <description>&lt;P&gt;This is one of those cases where the correct answer is often "None of the above".&amp;nbsp; The best way to get a date in this scenario is to have whatever is writing the QVD output put the max date into a variable or a separate file, and then read that.&lt;/P&gt;</description>
    <pubDate>Wed, 06 Sep 2023 12:50:09 GMT</pubDate>
    <dc:creator>Or</dc:creator>
    <dc:date>2023-09-06T12:50:09Z</dc:date>
    <item>
      <title>max(date) from a table with a billion rows</title>
      <link>https://community.qlik.com/t5/App-Development/max-date-from-a-table-with-a-billion-rows/m-p/2114095#M90949</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/22949"&gt;@tresB&lt;/a&gt;&amp;nbsp;,&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/25001"&gt;@Vegar&lt;/a&gt;&amp;nbsp;,&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/46628"&gt;@sunny_talwar&lt;/a&gt;&amp;nbsp;,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I would need to load data from a history table by filtering for the recent date, this table has more than a billion rows.&lt;/P&gt;
&lt;P&gt;In actual terms what i need to do is get the recent date of load on this table, there is col by name name load_date providing the date of load&amp;nbsp;&lt;/P&gt;
&lt;P&gt;so i will need to get&amp;nbsp; &amp;nbsp; &amp;nbsp;max(load_date) as maxdate from table1.qvd;&lt;/P&gt;
&lt;P&gt;let vmaxdate=peek('maxdate');&lt;/P&gt;
&lt;P&gt;and then do the filtering like&lt;/P&gt;
&lt;P&gt;load *&lt;/P&gt;
&lt;P&gt;from table1.qvd&lt;/P&gt;
&lt;P&gt;where load_date=vmaxdate;&lt;/P&gt;
&lt;P&gt;But the issue here is , the script which is supposed to get max(load_date) is running for more than 1.5 hrs and timing out.&lt;/P&gt;
&lt;P&gt;Please let me know if there is a better way to handle this situation so that my load time is minimized and i get the desired results&lt;/P&gt;</description>
      <pubDate>Wed, 06 Sep 2023 12:22:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/max-date-from-a-table-with-a-billion-rows/m-p/2114095#M90949</guid>
      <dc:creator>anushree1</dc:creator>
      <dc:date>2023-09-06T12:22:41Z</dc:date>
    </item>
    <item>
      <title>Re: max(date) from a table with a billion rows</title>
      <link>https://community.qlik.com/t5/App-Development/max-date-from-a-table-with-a-billion-rows/m-p/2114100#M90950</link>
      <description>&lt;P&gt;I suggest you to take a look at&amp;nbsp;&lt;A href="https://qlikviewcookbook.com/2013/09/fastest-method-to-read-maxfield-from-a-qvd/" target="_self"&gt;“FASTEST” METHOD TO READ MAX(FIELD) FROM A QVD&lt;/A&gt;&amp;nbsp; by Row Wunderlich. It is 10 years old, but still good.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 06 Sep 2023 12:28:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/max-date-from-a-table-with-a-billion-rows/m-p/2114100#M90950</guid>
      <dc:creator>Vegar</dc:creator>
      <dc:date>2023-09-06T12:28:22Z</dc:date>
    </item>
    <item>
      <title>Re: max(date) from a table with a billion rows</title>
      <link>https://community.qlik.com/t5/App-Development/max-date-from-a-table-with-a-billion-rows/m-p/2114109#M90952</link>
      <description>&lt;P&gt;This is one of those cases where the correct answer is often "None of the above".&amp;nbsp; The best way to get a date in this scenario is to have whatever is writing the QVD output put the max date into a variable or a separate file, and then read that.&lt;/P&gt;</description>
      <pubDate>Wed, 06 Sep 2023 12:50:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/max-date-from-a-table-with-a-billion-rows/m-p/2114109#M90952</guid>
      <dc:creator>Or</dc:creator>
      <dc:date>2023-09-06T12:50:09Z</dc:date>
    </item>
  </channel>
</rss>

