<?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: SQL QUERY IN EXTRACTOR in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/SQL-QUERY-IN-EXTRACTOR/m-p/1809865#M1212480</link>
    <description>&lt;P&gt;There are several noticeable points:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;pulling only the needed fields from the database and not all fields per * wildcard&lt;/LI&gt;&lt;LI&gt;there is a field RowID which indicates that it is just a record-counter from database-table and not a real value - if so, then remove it because it will determine the biggest pointer-value and you won't need it within a regular reporting (during the development of an application it might be helpful to check and compare data on a record-level if there are any issues with missing/wrong data - but not afterwards)&lt;/LI&gt;&lt;LI&gt;both conditions are in general not the same whereby it depends from the used driver and database how the statements are interpreted - Field = '0' &amp;lt;&amp;gt; Field = 0 &amp;lt;&amp;gt; Field &amp;lt;&amp;gt; 0 because the data-type and the formatting and the evaluation-rules from the tools may have an impact&lt;/LI&gt;&lt;LI&gt;if I assume that the fields are numeric probably boolean values it should be faster to evaluate them like:&lt;BR /&gt;S*T*X*Y*Z&amp;gt;0&lt;/LI&gt;&lt;LI&gt;further you should consider to apply an incremental approach for not querying all data again and again else just pulling the new/changed records&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;- Marcus&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sat, 22 May 2021 06:35:47 GMT</pubDate>
    <dc:creator>marcus_sommer</dc:creator>
    <dc:date>2021-05-22T06:35:47Z</dc:date>
    <item>
      <title>SQL QUERY IN EXTRACTOR</title>
      <link>https://community.qlik.com/t5/QlikView/SQL-QUERY-IN-EXTRACTOR/m-p/1809831#M1212475</link>
      <description>&lt;P&gt;Hello QlikGeeks,&lt;/P&gt;&lt;P&gt;I have been using the below query in the QlikView extractor to pull the data from SQL&lt;/P&gt;&lt;P&gt;&lt;U&gt;&lt;EM&gt;&lt;STRONG&gt;OLD QUERY&lt;/STRONG&gt;&lt;/EM&gt;&lt;/U&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;SuperMarket:&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;LOAD &lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;RowID,&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;OrderID,&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;OrderDate,&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;S,&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;T,&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;X,&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Y,&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Z;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;SQL SELECT *&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;FROM "Master".dbo."SuperMarket"&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;WHERE not(S='0' and T='0' and X='0' and Y='0' and Z='0' ) and (OrderDate) &amp;lt;= getDate();&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;But our SQL team asked to me tune the query because it is occupying more disk space while executing. So I had to tune as below&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;U&gt;&lt;STRONG&gt;NEW QUERY&lt;/STRONG&gt;&lt;/U&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;SuperMarket:&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;LOAD &lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;RowID,&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;OrderID,&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;OrderDate,&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;S,&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;T,&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;X,&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Y,&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Z;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;SQL SELECT *&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;FROM "Master".dbo."SuperMarket"&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;WITH(NOLOCK) WHERE not(S&amp;lt;&amp;gt;0 and T&amp;lt;&amp;gt;0 and X&amp;lt;&amp;gt;0 and Y&amp;lt;&amp;gt;0 and Z&amp;lt;&amp;gt;0 ) and (OrderDate) &amp;lt;= getDate();&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Somehow after the new query execution data is missing for few sheets. May I know if i am missing something or is any other way to tune the OLD QUERY?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in Advance,&lt;/P&gt;&lt;P&gt;CVR&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/46628"&gt;@sunny_talwar&lt;/a&gt;&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/28038"&gt;@marcus_sommer&lt;/a&gt;&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/22678"&gt;@jagan&lt;/a&gt;&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/22245"&gt;@swuehl&lt;/a&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 21 May 2021 17:45:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/SQL-QUERY-IN-EXTRACTOR/m-p/1809831#M1212475</guid>
      <dc:creator>CVR</dc:creator>
      <dc:date>2021-05-21T17:45:13Z</dc:date>
    </item>
    <item>
      <title>Re: SQL QUERY IN EXTRACTOR</title>
      <link>https://community.qlik.com/t5/QlikView/SQL-QUERY-IN-EXTRACTOR/m-p/1809865#M1212480</link>
      <description>&lt;P&gt;There are several noticeable points:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;pulling only the needed fields from the database and not all fields per * wildcard&lt;/LI&gt;&lt;LI&gt;there is a field RowID which indicates that it is just a record-counter from database-table and not a real value - if so, then remove it because it will determine the biggest pointer-value and you won't need it within a regular reporting (during the development of an application it might be helpful to check and compare data on a record-level if there are any issues with missing/wrong data - but not afterwards)&lt;/LI&gt;&lt;LI&gt;both conditions are in general not the same whereby it depends from the used driver and database how the statements are interpreted - Field = '0' &amp;lt;&amp;gt; Field = 0 &amp;lt;&amp;gt; Field &amp;lt;&amp;gt; 0 because the data-type and the formatting and the evaluation-rules from the tools may have an impact&lt;/LI&gt;&lt;LI&gt;if I assume that the fields are numeric probably boolean values it should be faster to evaluate them like:&lt;BR /&gt;S*T*X*Y*Z&amp;gt;0&lt;/LI&gt;&lt;LI&gt;further you should consider to apply an incremental approach for not querying all data again and again else just pulling the new/changed records&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;- Marcus&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 22 May 2021 06:35:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/SQL-QUERY-IN-EXTRACTOR/m-p/1809865#M1212480</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2021-05-22T06:35:47Z</dc:date>
    </item>
    <item>
      <title>Re: SQL QUERY IN EXTRACTOR</title>
      <link>https://community.qlik.com/t5/QlikView/SQL-QUERY-IN-EXTRACTOR/m-p/1811882#M1212695</link>
      <description>&lt;P&gt;Sorry for the late response. Thanks for your suggestions.&amp;nbsp; I made the suggested changes but it is not working for me.&amp;nbsp; May I know if there is any other way ?&lt;/P&gt;</description>
      <pubDate>Mon, 31 May 2021 16:33:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/SQL-QUERY-IN-EXTRACTOR/m-p/1811882#M1212695</guid>
      <dc:creator>CVR</dc:creator>
      <dc:date>2021-05-31T16:33:19Z</dc:date>
    </item>
    <item>
      <title>Re: SQL QUERY IN EXTRACTOR</title>
      <link>https://community.qlik.com/t5/QlikView/SQL-QUERY-IN-EXTRACTOR/m-p/1811892#M1212696</link>
      <description>&lt;P&gt;What didn't work? Did you do a systematically testing? Maybe also with a further reduced dataset like lesser columns and/or another conditions like querying just a few days to speed up the execution times to be able test the logics and syntax in rather short times before applying it on the whole dataset.&lt;/P&gt;&lt;P&gt;- Marcus&lt;/P&gt;</description>
      <pubDate>Mon, 31 May 2021 17:01:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/SQL-QUERY-IN-EXTRACTOR/m-p/1811892#M1212696</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2021-05-31T17:01:51Z</dc:date>
    </item>
    <item>
      <title>Re: SQL QUERY IN EXTRACTOR</title>
      <link>https://community.qlik.com/t5/QlikView/SQL-QUERY-IN-EXTRACTOR/m-p/1811893#M1212697</link>
      <description>&lt;P&gt;"An error occurred while executing batch. Error message is: Exception of type 'System.OutOfMemoryException' was thrown."&lt;/P&gt;</description>
      <pubDate>Mon, 31 May 2021 17:05:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/SQL-QUERY-IN-EXTRACTOR/m-p/1811893#M1212697</guid>
      <dc:creator>CVR</dc:creator>
      <dc:date>2021-05-31T17:05:08Z</dc:date>
    </item>
    <item>
      <title>Re: SQL QUERY IN EXTRACTOR</title>
      <link>https://community.qlik.com/t5/QlikView/SQL-QUERY-IN-EXTRACTOR/m-p/1811895#M1212699</link>
      <description>&lt;P&gt;How many RAM consumed this app? Especially these query? After which time/ records and/or RAM consumption comes this error?&lt;/P&gt;&lt;P&gt;Which other tasks/processes are running in parallel? How many RAM is in general available?&lt;/P&gt;&lt;P&gt;Such issues needs a carefully monitoring of the vital hardware KPI's. I assume that your task may running without such errors but it's quite likely that the run-times aren't satisfying without applying any incremental approaches - therefore I suggest to consider them.&lt;/P&gt;&lt;P&gt;- Marcus&lt;/P&gt;</description>
      <pubDate>Mon, 31 May 2021 17:19:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/SQL-QUERY-IN-EXTRACTOR/m-p/1811895#M1212699</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2021-05-31T17:19:31Z</dc:date>
    </item>
  </channel>
</rss>

