<?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: QlikView Oracle Optimization in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/QlikView-Oracle-Optimization/m-p/917255#M318009</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Check this thread. Hope this will help you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/thread/18473"&gt;*** 6 Weeks in to QV Development, 30 Million Records QV Document and Help Needed!!! ****&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 12 Aug 2015 03:45:04 GMT</pubDate>
    <dc:creator>qlikviewwizard</dc:creator>
    <dc:date>2015-08-12T03:45:04Z</dc:date>
    <item>
      <title>QlikView Oracle Optimization</title>
      <link>https://community.qlik.com/t5/QlikView/QlikView-Oracle-Optimization/m-p/917248#M318002</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0px 0px 10pt;"&gt;&lt;SPAN style="color: #000000; font-family: Calibri; font-size: 12pt;"&gt;I have an Oracle database of a lot of data to pull data per month (approx. 2.5 million records per month) to pull from Oracle to individual monthly files (six years’ worth).&amp;nbsp; I have two ways I was testing the pull of the Oracle data to QVDs: 1) I pulled all the data with one SQL Select statement with 6 sub-queries (different selection criteria in each sub-query) 55 rows of data per month filter; 2) I pulled the main data (48 rows) separately with one SQL Select statement filter by a given month, then created separate single pull (7 additional rows) from the Oracle table and joined back to the resident table prior to saving the QVD. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0px 0px 10pt;"&gt;&lt;SPAN style="color: #000000; font-family: Calibri; font-size: 12pt;"&gt;The single pull (1) from the Oracle table took 4.5 hours, whereas the multiple pulls (2) with joins took between 20 min. and 25 min.&amp;nbsp; What is going on behind scenes/optimization that makes the single pull of data with the sub-queries take so long?&amp;nbsp; I noticed a comment in the community suggests pulling large about of data through SQL-Plus to text was very fast, then they pull the text file back in to QlikView.&amp;nbsp;&amp;nbsp; I ran the SQL Select with the sub-queries in SQL Developer and it took 3 min. to run and pull the data. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Aug 2015 11:54:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/QlikView-Oracle-Optimization/m-p/917248#M318002</guid>
      <dc:creator>bjsellers57</dc:creator>
      <dc:date>2015-08-10T11:54:32Z</dc:date>
    </item>
    <item>
      <title>Re: QlikView Oracle Optimization</title>
      <link>https://community.qlik.com/t5/QlikView/QlikView-Oracle-Optimization/m-p/917249#M318003</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="margin: 0 0 10pt; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 12pt; font-family: Calibri; color: #000000;"&gt;I have an Oracle database of a lot of data to pull data per month (approx. 2.5 million records per month) to pull from Oracle to individual monthly files (six years’ worth). &lt;/SPAN&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 12pt; font-family: Calibri; color: #000000;"&gt;&lt;STRONG&gt;So is that 2.5 million source rows that result in 2.5 million result rows? x 12 x 6 ? = 360 million result rows?&lt;/STRONG&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P style="margin: 0 0 10pt; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 12pt; font-family: Calibri; color: #000000;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0 0 10pt; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 12pt; font-family: Calibri; color: #000000;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0 0 10pt; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 12pt; font-family: Calibri; color: #000000;"&gt;I have two ways I was testing the pull of the Oracle data to QVDs: 1) I pulled all the data with one SQL Select statement with 6 sub-queries (different selection criteria in each sub-query) 55 rows of data per month filter;&lt;/SPAN&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 12pt; font-family: Calibri; color: #000000;"&gt;&lt;STRONG&gt;Is this a single compound Oracle SQL statement with 6 sub-queries as a part of the SQL? What do you mean by 55 rows of data per month filter? Is that a joined table that filters the resulting rows?&lt;/STRONG&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P style="margin: 0 0 10pt; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 12pt; font-family: Calibri; color: #000000;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0 0 10pt; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 12pt; font-family: Calibri; color: #000000;"&gt;2) I pulled the main data (48 rows) separately with one SQL Select statement filter by a given month, then created separate single pull (7 additional rows) from the Oracle table and joined back to the resident table prior to saving the 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;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 12pt; font-family: 'Times New Roman'; color: #000000;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0 0 10pt; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 12pt; font-family: Calibri; color: #000000;"&gt;The single pull (1) from the Oracle table took 4.5 hours, whereas the multiple pulls (2) with joins took between 20 min. and 25 min.&amp;nbsp; What is going on behind scenes/optimization that makes the single pull of data with the sub-queries take so long?&amp;nbsp; I noticed a comment in the community suggests pulling large about of data through SQL-Plus to text was very fast, then they pull the text file back in to QlikView.&amp;nbsp;&amp;nbsp; I ran the SQL Select with the sub-queries in SQL Developer and it took 3 min. to run and pull the data.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0 0 10pt; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 12pt; font-family: Calibri; color: #000000;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 12pt; font-family: Calibri; color: #000000;"&gt;&lt;STRONG&gt;If you run a single SQL query with multiple subqueries QlikView does not interfer or interact with what is going on at the Oracle Server - the slow-down from 3 minutes down to 4.5 hours seems to be due to the inefficiency or configuration of the ODBC / OLEDB drivers and or your infrastructure between the QlikView Server and Oracle Server&lt;/STRONG&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 12pt; font-family: 'Times New Roman'; color: #000000;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Aug 2015 14:56:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/QlikView-Oracle-Optimization/m-p/917249#M318003</guid>
      <dc:creator>petter</dc:creator>
      <dc:date>2015-08-11T14:56:57Z</dc:date>
    </item>
    <item>
      <title>Re: QlikView Oracle Optimization</title>
      <link>https://community.qlik.com/t5/QlikView/QlikView-Oracle-Optimization/m-p/917250#M318004</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Peter,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Yes there are 2.5 million records per month of data.  I keep in separate QVD 72 in all allowing the reporting application to pick and choose which months are needing for reporting on.  As or Rows, I should have said Columns of data thinking in terms of a database&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What I wanted to do in lieu of hitting the database several times is make one pass on the database, thus in scenario 2 I took the sub queries from the separate data pulls used in scenario 1 and added them to the main pull making one pass to the Oracle Database.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I pass the parameters for the vRepCycle and vOutputFile to the function in a Do while building 72 separate QVDs, one for each month&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Unfortunately scenario 2 takes way too long to execute&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Scenario 1&lt;/P&gt;&lt;P&gt;LET vQVDPath = '..\Internal\DataSources\CDB\';&lt;/P&gt;&lt;P&gt;LET vRepCycle = 20150701;&lt;/P&gt;&lt;P&gt;Let vFileName = Peek('FileName',$(i),'LOAN_INFO_QVD_LIST');&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA_DYNAMIC:&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;LDI_KEY,&lt;/P&gt;&lt;P&gt;      RepCycle,&lt;/P&gt;&lt;P&gt;REPORTED_ACTION_CODE,&lt;/P&gt;&lt;P&gt;       Field1,&lt;/P&gt;&lt;P&gt;       Field2,&lt;/P&gt;&lt;P&gt;       Field3,&lt;/P&gt;&lt;P&gt;       ......,&lt;/P&gt;&lt;P&gt;Field48&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt; SQL SELECT&lt;/P&gt;&lt;P&gt;       LDI.LDI_KEY,&lt;/P&gt;&lt;P&gt;       LDI.REP_CYCLE,&lt;/P&gt;&lt;P&gt;LDI_REPORTED_ACTION_CODE,&lt;/P&gt;&lt;P&gt;       LDI.Field1,&lt;/P&gt;&lt;P&gt;       LDI.Field2,&lt;/P&gt;&lt;P&gt;       LDI.Field3,&lt;/P&gt;&lt;P&gt;       LDI. ...  ,&lt;/P&gt;&lt;P&gt;LDI.Field48,&lt;/P&gt;&lt;P&gt;FROM DATA_DYNAMIC LDI&lt;/P&gt;&lt;P&gt;       JOIN DATA_STATIC on DATA_STATIC.INTERNAL_ID = LDI.INTERNAL_ID&lt;/P&gt;&lt;P&gt;       JOIN POOL_DATA POI on POI.POOL_NBR = LDI.POOL_NBR&lt;/P&gt;&lt;P&gt;       JOIN SERIES_DATA SRI on SRI.SERIES_NBR = POI.SERIES_NBR&lt;/P&gt;&lt;P&gt;WHERE LDI.REP_CYCLE = $(vRepCycle)&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Join (DATA_DYNAMIC)&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;LDI_KEY,&lt;/P&gt;&lt;P&gt;       Field49,&lt;/P&gt;&lt;P&gt;       Field50&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;SQL SELECT&lt;/P&gt;&lt;P&gt;       LDI_KEY,&lt;/P&gt;&lt;P&gt;       RepCycle,&lt;/P&gt;&lt;P&gt;       (SELECT BK_CODE FROM (SELECT internal_id as ilid, BK_FILED_DATE, BK_EXIT_DATE, BK_CODE FROM BK order by BK_FILED_DATE DESC)&lt;/P&gt;&lt;P&gt;              WHERE ilid=LDI.INTERNAL_ID AND TRUNC(BK_FILED_DATE,'MM') &amp;lt;= LDI.CYCLE_DATE AND (TRUNC(BK_EXIT_DATE,'MM') &amp;gt;= LDI.CYCLE_DATE or BK_EXIT_DATE IS NULL) and ROWNUM=1) as “Field49”,&lt;/P&gt;&lt;P&gt;       (SELECT BK_FILED_DATE FROM (SELECT internal_id as ilid, BK_FILED_DATE, BK_EXIT_DATE, BK_CHAPTER_CODE FROM BK order by BK_FILED_DATE DESC)&lt;/P&gt;&lt;P&gt;              WHERE ilid=LDI.INTERNAL_ID AND TRUNC(BK_FILED_DATE,'MM') &amp;lt;= LDI.CYCLE_DATE AND (TRUNC(BK_EXIT_DATE,'MM') &amp;gt;= LDI.CYCLE_DATE or BK_EXIT_DATE IS NULL) and ROWNUM=1) as “Field50”&lt;/P&gt;&lt;P&gt;FROM DATA_DYNAMIC LDI&lt;/P&gt;&lt;P&gt;WHERE LDI.REPORTED_ACTION_CODE='51' AND  LDI.REP_CYCLE = $(vRepCycle)&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;JOIN (DATA_DYNAMIC)&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;       LDI_KEY,&lt;/P&gt;&lt;P&gt;       Field51&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;SQL SELECT&lt;/P&gt;&lt;P&gt;       LDI.LDI_KEY,&lt;/P&gt;&lt;P&gt;       LDI.CYCLE_DATE,&lt;/P&gt;&lt;P&gt;       (SELECT trunc(ATT_REFERRAL_DATE) FROM (SELECT internal_id as ilid, ATT_REFERRAL_DATE, FRCLSR_EXIT_DATE FROM FORE order by ATT_REFERRAL_DATE DESC)&lt;/P&gt;&lt;P&gt;              WHERE ilid=ldi.INTERNAL_ID AND TRUNC(ATT_REFERRAL_DATE,'MM') &amp;lt;= ldi.CYCLE_DATE AND (TRUNC(FRC_EXIT_DATE,'MM') &amp;gt;= ldi.CYCLE_DATE or FRC_EXIT_DATE IS NULL) and ROWNUM=1) as "Field51"&lt;/P&gt;&lt;P&gt;FROM DATA_DYNAMIC LDI&lt;/P&gt;&lt;P&gt;WHERE LDI.REPORTED_ACTION_CODE in ('3','17','27') AND LDI.REP_CYCLE = $(vRepCycle)&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Join (DATA_DYNAMIC)&lt;/P&gt;&lt;P&gt;LOAD LDI_KEY,&lt;/P&gt;&lt;P&gt;       Field52&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;SQL SELECT&lt;/P&gt;&lt;P&gt;       LDI.LDI_KEY,&lt;/P&gt;&lt;P&gt;       LDI.CYCLE_DATE,&lt;/P&gt;&lt;P&gt;       (SELECT trunc(FRC_SALE_DATE) FROM (SELECT internal_id as ilid, ATT_REFERRAL_DATE, FRC_SALE_DATE FROM FORE order by FRC_SALE_DATE DESC)&lt;/P&gt;&lt;P&gt;              WHERE ilid=ldi.INTERNAL_ID AND TRUNC(FRC_SALE_DATE,'MM') &amp;lt;= ldi.CYCLE_DATE AND FRC_SALE_DATE is not null and ROWNUM=1) as "Field52"&lt;/P&gt;&lt;P&gt;FROM DATA_DYNAMIC LDI&lt;/P&gt;&lt;P&gt;WHERE LDI.REPORTED_ACTION_CODE='7' AND LDI.REP_CYCLE = $(vRepCycle)&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;STORE DATA_DYNAMIC into $(vQVDPath)$(vOutputFile);&lt;/P&gt;&lt;P&gt;DROP Table DATA_DYNAMIC;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Scenario 2&lt;/P&gt;&lt;P&gt;LET vQVDPath = '..\Internal\DataSources\CDB\';&lt;/P&gt;&lt;P&gt;LET vRepCycle = 20150701;&lt;/P&gt;&lt;P&gt;Let vFileName = Peek('FileName',$(i),'LOAN_INFO_QVD_LIST');&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA_DYNAMIC:&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;LDI_KEY,&lt;/P&gt;&lt;P&gt;       RepCycle,&lt;/P&gt;&lt;P&gt;REPORTED_ACTION_CODE,&lt;/P&gt;&lt;P&gt;Field1,&lt;/P&gt;&lt;P&gt;       Field2,&lt;/P&gt;&lt;P&gt;       Field3,&lt;/P&gt;&lt;P&gt;       ......,&lt;/P&gt;&lt;P&gt;Field48&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt; SQL SELECT&lt;/P&gt;&lt;P&gt;       LDI.LDI_KEY,&lt;/P&gt;&lt;P&gt;       LDI.REP_CYCLE,&lt;/P&gt;&lt;P&gt;LDI_REPORTED_ACTION_CODE,&lt;/P&gt;&lt;P&gt;       LDI.Field1,&lt;/P&gt;&lt;P&gt;       LDI.Field2,&lt;/P&gt;&lt;P&gt;       LDI.Field3,&lt;/P&gt;&lt;P&gt;       LDI.      ,&lt;/P&gt;&lt;P&gt;LDI.Field48,&lt;/P&gt;&lt;P&gt;(SELECT BK_CODE FROM (SELECT internal_id as ilid, BK_FILED_DATE, BK_EXIT_DATE, BK_CODE FROM BK order by BK_FILED_DATE DESC)&lt;/P&gt;&lt;P&gt;              WHERE LDI.REPORTED_ACTION_CODE=51 AND ilid=LDI.INTERNAL_ID    AND TRUNC(BK_FILED_DATE,'MM') &amp;lt;= LDI.CYCLE_DATE AND (TRUNC(BK_EXIT_DATE,'MM') &amp;gt;= LDI.CYCLE_DATE or BK_EXIT_DATE IS NULL) and ROWNUM=1) as “Field49”,&lt;/P&gt;&lt;P&gt;       (SELECT BK_FILED_DATE FROM (SELECT internal_id as ilid, BK_FILED_DATE, BK_EXIT_DATE, BK_CHAPTER_CODE FROM BK order by BK_FILED_DATE DESC)&lt;/P&gt;&lt;P&gt;              WHERE LDI.REPORTED_ACTION_CODE=51 AND ilid=LDI.INTERNAL_ID AND TRUNC(BK_FILED_DATE,'MM') &amp;lt;= LDI.CYCLE_DATE AND (TRUNC(BK_EXIT_DATE,'MM') &amp;gt;= LDI.CYCLE_DATE or BK_EXIT_DATE IS NULL) and ROWNUM=1) as “Field50”,&lt;/P&gt;&lt;P&gt;(SELECT trunc(ATT_REFERRAL_DATE) FROM (SELECT internal_id as ilid, ATT_REFERRAL_DATE, FRC_EXIT_DATE FROM FORE order by ATT_REFERRAL_DATE DESC)&lt;/P&gt;&lt;P&gt;              WHERE LDI.REPORTED_ACTION_CODE in ('3','17','27')AND ilid=ldi.INTERNAL_ID AND TRUNC(ATT_REFERRAL_DATE,'MM') &amp;lt;= ldi.CYCLE_DATE AND (TRUNC(FRCLSR_EXIT_DATE,'MM') &amp;gt;= ldi.CYCLE_DATE or FRC_EXIT_DATE IS NULL) and ROWNUM=1) as "Field51",&lt;/P&gt;&lt;P&gt;(SELECT trunc(FRC_SALE_DATE) FROM (SELECT internal_id as ilid, ATT_REFERRAL_DATE, FRC_SALE_DATE FROM FORE order by FRC_SALE_DATE DESC)&lt;/P&gt;&lt;P&gt;              WHERE LDI.REPORTED_ACTION_CODE=7 ilid=ldi.INTERNAL_ID AND TRUNC(FRC_SALE_DATE,'MM') &amp;lt;= ldi.CYCLE_DATE AND FRC_SALE_DATE is not null and ROWNUM=1) as "Field52"&lt;/P&gt;&lt;P&gt;FROM DATA_DYNAMIC LDI&lt;/P&gt;&lt;P&gt;       JOIN DATA_STATIC on DATA_STATIC.INTERNAL_ID = LDI.INTERNAL_ID&lt;/P&gt;&lt;P&gt;       JOIN POOL_DATA POI on POI.POOL_NBR = LDI.POOL_NBR&lt;/P&gt;&lt;P&gt;       JOIN SERIES_DATA SRI on SRI.SERIES_NBR = POI.SERIES_NBR&lt;/P&gt;&lt;P&gt;WHERE LDI.REP_CYCLE = $(vRepCycle)&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;STORE DATA_DYNAMIC into $(vQVDPath)$(vOutputFile);&lt;/P&gt;&lt;P&gt;DROP Table DATA_DYNAMIC;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for taking a look at it and your response&lt;/P&gt;&lt;P&gt;Bernie Sellers&lt;/P&gt;&lt;P&gt;Analytical Consultant&lt;/P&gt;&lt;P&gt;(p)410.884.2182&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Aug 2015 16:30:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/QlikView-Oracle-Optimization/m-p/917250#M318004</guid>
      <dc:creator>bjsellers57</dc:creator>
      <dc:date>2015-08-11T16:30:41Z</dc:date>
    </item>
    <item>
      <title>Re: QlikView Oracle Optimization</title>
      <link>https://community.qlik.com/t5/QlikView/QlikView-Oracle-Optimization/m-p/917251#M318005</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The 4.5 hour run-time is that for all the six years or just for a single month?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Aug 2015 16:53:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/QlikView-Oracle-Optimization/m-p/917251#M318005</guid>
      <dc:creator>petter</dc:creator>
      <dc:date>2015-08-11T16:53:53Z</dc:date>
    </item>
    <item>
      <title>Re: QlikView Oracle Optimization</title>
      <link>https://community.qlik.com/t5/QlikView/QlikView-Oracle-Optimization/m-p/917252#M318006</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Single Month&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Bernie Sellers&lt;/P&gt;&lt;P&gt;Analytical Consultant&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Aug 2015 16:57:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/QlikView-Oracle-Optimization/m-p/917252#M318006</guid>
      <dc:creator>bjsellers57</dc:creator>
      <dc:date>2015-08-11T16:57:05Z</dc:date>
    </item>
    <item>
      <title>Re: QlikView Oracle Optimization</title>
      <link>https://community.qlik.com/t5/QlikView/QlikView-Oracle-Optimization/m-p/917253#M318007</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;My best advice is to run this very efficient query (for Oracle) on the Oracle server and store the result set in an Oracle table and then read this single table from QlikView and see what kind of performance you then get.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Aug 2015 17:02:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/QlikView-Oracle-Optimization/m-p/917253#M318007</guid>
      <dc:creator>petter</dc:creator>
      <dc:date>2015-08-11T17:02:23Z</dc:date>
    </item>
    <item>
      <title>Re: QlikView Oracle Optimization</title>
      <link>https://community.qlik.com/t5/QlikView/QlikView-Oracle-Optimization/m-p/917254#M318008</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I would do these test&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1) in sqlplus run the single query (1 month, If I understood the 4.5 hour query) and wait until you get all records&lt;/P&gt;&lt;P&gt;Why? Because (in sql developer, toad, etc, .....) you get the first rows from the db after some seconds but you should measure the time for all the rows&lt;/P&gt;&lt;P&gt;This is your WAY 1&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2) in sqlplus run the 6-7 query (WAY 2), the join doesn't matter&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Compare the time of 1) and 2) with the time you get in Qlik (4.5 hours, 20-25 minutes).&lt;/P&gt;&lt;P&gt;I think you get the same time or just a little better in SqlPlus vs Qlik (in 2, sqlplus doesn't join) &lt;/P&gt;&lt;P&gt;If you get the same time, the way to get better is ask your Oracle dba to optimize the query (it seems there are some order by you can skip).&lt;/P&gt;&lt;P&gt;If not, let we know.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;P.S. its not so strange that when the query becomes complex (single query), the Oracle optimizer doesn't choose the best execution plan and the exec time increases &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Aug 2015 20:18:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/QlikView-Oracle-Optimization/m-p/917254#M318008</guid>
      <dc:creator>maxgro</dc:creator>
      <dc:date>2015-08-11T20:18:24Z</dc:date>
    </item>
    <item>
      <title>Re: QlikView Oracle Optimization</title>
      <link>https://community.qlik.com/t5/QlikView/QlikView-Oracle-Optimization/m-p/917255#M318009</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Check this thread. Hope this will help you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/thread/18473"&gt;*** 6 Weeks in to QV Development, 30 Million Records QV Document and Help Needed!!! ****&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Aug 2015 03:45:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/QlikView-Oracle-Optimization/m-p/917255#M318009</guid>
      <dc:creator>qlikviewwizard</dc:creator>
      <dc:date>2015-08-12T03:45:04Z</dc:date>
    </item>
  </channel>
</rss>

