<?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 Performance issue - Check if rows exist in Resident Table in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Performance-issue-Check-if-rows-exist-in-Resident-Table/m-p/258343#M97534</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, Im performing an incremental load.&lt;/P&gt;&lt;P&gt;A part of the script requires a test if new records were found.&lt;/P&gt;&lt;P&gt;For this I add the following test:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; LOAD 1 as Dummy&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Resident $(table)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; where RowNo()=0;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; LET vNewRecordsExists = If(peek('Dummy')=1,-1,0);&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;But, too much time is spent on this test, meaning this test has bad performance.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any suggestion to improve performance of this test will be appreciated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ori&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 08 Jan 2012 09:32:17 GMT</pubDate>
    <dc:creator>orital81</dc:creator>
    <dc:date>2012-01-08T09:32:17Z</dc:date>
    <item>
      <title>Performance issue - Check if rows exist in Resident Table</title>
      <link>https://community.qlik.com/t5/QlikView/Performance-issue-Check-if-rows-exist-in-Resident-Table/m-p/258343#M97534</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, Im performing an incremental load.&lt;/P&gt;&lt;P&gt;A part of the script requires a test if new records were found.&lt;/P&gt;&lt;P&gt;For this I add the following test:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; LOAD 1 as Dummy&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Resident $(table)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; where RowNo()=0;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; LET vNewRecordsExists = If(peek('Dummy')=1,-1,0);&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;But, too much time is spent on this test, meaning this test has bad performance.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any suggestion to improve performance of this test will be appreciated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ori&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 08 Jan 2012 09:32:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Performance-issue-Check-if-rows-exist-in-Resident-Table/m-p/258343#M97534</guid>
      <dc:creator>orital81</dc:creator>
      <dc:date>2012-01-08T09:32:17Z</dc:date>
    </item>
    <item>
      <title>Performance issue - Check if rows exist in Resident Table</title>
      <link>https://community.qlik.com/t5/QlikView/Performance-issue-Check-if-rows-exist-in-Resident-Table/m-p/258344#M97535</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear Ori,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I use "not exist" function to get the insert's in a new data set..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;At the below, you can see the code that i use.. First of all, i define a variable which holds last execution date.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;First load statement, load the data from an excel sheet or rdbms system. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;At where condition i get the data of the last reload date.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then i reload my existing data which i store it as a qvd file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then , concetanete the first load statement with the second one by using the "not exist" function. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LET vLASTRELOAD= NUM(RIGHT(DATE(RELOADTIME()),2))&amp;amp;LEFT(DATE(RELOADTIME()),2)&amp;amp;MID(DATE(RELOADTIME()),4,2);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Directory;&lt;/P&gt;&lt;P&gt;LOAD ID, &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;A,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;B,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;DATE,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;UPDATE_DATE&lt;/P&gt;&lt;P&gt;FROM INC.xls (biff, embedded labels, table is Sheet1$) WHERE $(vLASTRELOAD)=UPDATE_DATE;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CONCATENATE &lt;/P&gt;&lt;P&gt;Directory;&lt;/P&gt;&lt;P&gt;LOAD ID, &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;A,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;B,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;DATE,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;UPDATE_DATE&lt;/P&gt;&lt;P&gt;FROM INC.QVD (qvd)&lt;/P&gt;&lt;P&gt;WHERE NOT EXISTS(ID); //INSERT&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope, it gives you an idea about the processes.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BR&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Omer&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 08 Jan 2012 09:57:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Performance-issue-Check-if-rows-exist-in-Resident-Table/m-p/258344#M97535</guid>
      <dc:creator />
      <dc:date>2012-01-08T09:57:40Z</dc:date>
    </item>
    <item>
      <title>Performance issue - Check if rows exist in Resident Table</title>
      <link>https://community.qlik.com/t5/QlikView/Performance-issue-Check-if-rows-exist-in-Resident-Table/m-p/258345#M97536</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; Hi Omer&lt;/P&gt;&lt;P&gt;Thanks for the helpful answer. &lt;/P&gt;&lt;P&gt;But What if I could find a fast way to validate new lines existance,&lt;/P&gt;&lt;P&gt;wouldn't it be faster to skip this Concatenation step when no lines are found?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 08 Jan 2012 10:31:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Performance-issue-Check-if-rows-exist-in-Resident-Table/m-p/258345#M97536</guid>
      <dc:creator>orital81</dc:creator>
      <dc:date>2012-01-08T10:31:26Z</dc:date>
    </item>
    <item>
      <title>Performance issue - Check if rows exist in Resident Table</title>
      <link>https://community.qlik.com/t5/QlikView/Performance-issue-Check-if-rows-exist-in-Resident-Table/m-p/258346#M97537</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ori,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can validate it with different ways but in the end, you need to insert the new lines to your existing dataset.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;as far as i know that, reading a dataset from qvd and concetentation is not very time consuming processes.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;in my example, where condition will be a time consuming event, but no other way to understand which row is the inserted other than comparing timestamp fields.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You may wish to use some other specific change-data capture (CDC) tools to get changes less than a second.&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Jan 2012 07:02:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Performance-issue-Check-if-rows-exist-in-Resident-Table/m-p/258346#M97537</guid>
      <dc:creator />
      <dc:date>2012-01-09T07:02:59Z</dc:date>
    </item>
  </channel>
</rss>

