<?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 AW:Re: AW:Re: Best practice for SAP Connector (5.2) in QlikView in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Best-practice-for-SAP-Connector-5-2-in-QlikView/m-p/195012#M1229964</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Florian,&lt;/P&gt;&lt;P&gt;Your script have some querys that takes very long time but returns onyl a few record.&lt;/P&gt;&lt;P&gt;At line 182 the following SQL takes 51 minutes and returns only 2.080 lines.&lt;/P&gt;&lt;P&gt;SELECT VBELN,VKORG,AUART,AUGRU,BSTDK,BSTNK,BNAME,ERDAT,KNUMV,VTWEG FROM VBAK&lt;/P&gt;&lt;P&gt;where ERDAT &amp;gt;= '20100526' OR AEDAT &amp;gt;= '20100526'&lt;/P&gt;&lt;P&gt;ERDAT stores the date when document was created and AEDAT stores the date when record was changed.&lt;/P&gt;&lt;P&gt;By default AEDAT is not an indexed field. Only ERDAT is indexed, then I think your query do a Table Full Scan to retrieve a few records.&lt;/P&gt;&lt;P&gt;This filter is already used at line 358 and 509. and these querys takes 50 minutes too.&lt;/P&gt;&lt;P&gt;The overall time to run these querys takes approximately 3 hours.&lt;/P&gt;&lt;P&gt;You have another bottleneck at line 113, but this query may be using an index because vbeln is part of the primary key.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT VBELN,BESTK,LFSTK,LFGSK,WBSTK,ABSTK,GBSTK,AEDAT&lt;/P&gt;&lt;P&gt;FROM VBUK&lt;/P&gt;&lt;P&gt;where ( ( VBELN between '0100490392' and '0199999999' )&lt;/P&gt;&lt;P&gt;or ( VBELN between '1200007042' and '1299999999' )&lt;/P&gt;&lt;P&gt;or ( VBELN between '1300007329' and '1399999999' ) )&lt;/P&gt;&lt;P&gt;8 fields found: VBELN_VERTRIEBSBELEG, BESTK_BESTÄTIGT, LFSTK_LIEFERSTATUS, LFGSK_GESAMTLIEFERSTATUS, WBSTK_GESWARENBEWEGUNGSTAT, ABSTK_ABSAGESTATUS, GBSTK_GESAMTSTATUS, AEDAT_GEÄNDERT_AM, 2.935.300 lines fetched&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This query takes 45 minutes to retrieve 2.9 milions lines.&lt;/P&gt;&lt;DIV&gt;Conclusion:&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;Try to modify the way you filter the records when retrieving data from VBAK. Why not use the z-table that log the updates. I see VBAK as one of the tables loged. May be this query could help you, using the z-table as the main filter:&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV&gt;SELECT VBAK~VBELN,VBAK~VKORG,VBAK~AUART,VBAK~AUGRU,&lt;/DIV&gt;&lt;DIV&gt;VBAK~BSTDK,VBAK~BSTNK,VBAK~BNAME,VBAK~ERDAT,&lt;/DIV&gt;&lt;DIV&gt;VBAK~KNUMV,VBAK~VTWEG&lt;/DIV&gt;&lt;DIV&gt;FROM VBAK&lt;/DIV&gt;&lt;DIV&gt;JOIN ZPMWM_AEND ON VBAK~VBELN = ZPMWM_AEND~VBELN&lt;/DIV&gt;&lt;DIV&gt;where ZPMWM_AEND~TABNAME = 'VBAK'&lt;/DIV&gt;&lt;DIV&gt;AND ZPMWM_AEND~UDATE &amp;gt;= '20100526'&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;Good Luck&lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 28 May 2010 15:01:48 GMT</pubDate>
    <dc:creator>pablolabbe</dc:creator>
    <dc:date>2010-05-28T15:01:48Z</dc:date>
    <item>
      <title>Best practice for SAP Connector (5.2) in QlikView</title>
      <link>https://community.qlik.com/t5/QlikView/Best-practice-for-SAP-Connector-5-2-in-QlikView/m-p/195006#M1229949</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The following code is an example of a powerpoint from QlikView 7. We use the SAP-Connector 5.2 and our duration will need more time every day. We handel ca. 270.000 recards a day and need more than 8 hourse to edit the data since the year 2006. The consultant, who create the application ist out of office since 2008 and we inherit the project. I´m thankful for every idea. Thank you.&lt;/P&gt;&lt;P&gt;with kind regards&lt;/P&gt;&lt;P&gt;Florian&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE ___default_attr="plain" class="jive_text_macro jive_macro_code" jivemacro="code"&gt;&lt;BR /&gt;QV_Table:&lt;BR /&gt;SQL SELECT PrimaryKey, X, Y FROM DB_TABLE&lt;BR /&gt;WHERE ModificationTime &amp;gt;= #$(LastExecTime)#&lt;BR /&gt;AND ModificationTime &amp;lt; #$(BeginningThisExecTime)#;&lt;BR /&gt;&lt;BR /&gt;Concatenate&lt;BR /&gt;LOAD PrimaryKey, X, Y FROM File.QVD&lt;BR /&gt;WHERE NOT EXISTS(PrimaryKey);&lt;BR /&gt;&lt;BR /&gt;Inner Join&lt;BR /&gt;SQL SELECT PrimaryKey FROM DB_TABLE;&lt;BR /&gt;&lt;BR /&gt;STORE QV_Table INTO File.QVD;&lt;BR /&gt;[\code]&lt;BR /&gt; &amp;lt;/body&amp;gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 26 Jan 2026 21:26:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Best-practice-for-SAP-Connector-5-2-in-QlikView/m-p/195006#M1229949</guid>
      <dc:creator />
      <dc:date>2026-01-26T21:26:37Z</dc:date>
    </item>
    <item>
      <title>Best practice for SAP Connector (5.2) in QlikView</title>
      <link>https://community.qlik.com/t5/QlikView/Best-practice-for-SAP-Connector-5-2-in-QlikView/m-p/195007#M1229952</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This code do an incremental load of a QVD.&lt;/P&gt;&lt;P&gt;You say that Qlikview needs 8 hours to extract 270.000 records and all of these records are since 2006 ?&lt;/P&gt;&lt;P&gt;Or&lt;/P&gt;&lt;P&gt;Qlikview need 8 hours to extract data since 2006, and for each day you have 270.000 records ?&lt;/P&gt;&lt;P&gt;How large are the QVDs ? ( records and File Size )&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 May 2010 00:31:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Best-practice-for-SAP-Connector-5-2-in-QlikView/m-p/195007#M1229952</guid>
      <dc:creator>pablolabbe</dc:creator>
      <dc:date>2010-05-28T00:31:43Z</dc:date>
    </item>
    <item>
      <title>Best practice for SAP Connector (5.2) in QlikView</title>
      <link>https://community.qlik.com/t5/QlikView/Best-practice-for-SAP-Connector-5-2-in-QlikView/m-p/195008#M1229956</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;By no means this code could take 8 hours and extract only 270k records. Do you have any for-next loop going before or after this piece of code?&lt;/P&gt;&lt;P&gt;Is is possible for you to attach whole qvw document here? Since it's storing the QVD and probably (and hopefully) dropping the table, the QVW size should be pretty small.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 May 2010 04:16:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Best-practice-for-SAP-Connector-5-2-in-QlikView/m-p/195008#M1229956</guid>
      <dc:creator>disqr_rm</dc:creator>
      <dc:date>2010-05-28T04:16:02Z</dc:date>
    </item>
    <item>
      <title>AW:Re: Best practice for SAP Connector (5.2) in QlikView</title>
      <link>https://community.qlik.com/t5/QlikView/Best-practice-for-SAP-Connector-5-2-in-QlikView/m-p/195009#M1229957</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;We get ca. 270k records per day from SAP. The QVDs are splitted in years, so we have a QVD File for every SAP table and year. We must change our QVDs within new, changed and delteted records. In our workflow we have 8 QVW scripts that get and transform the data and at last 3 QVW, that are the GUI for the data.&lt;/P&gt;&lt;P&gt;here is an extract from our code for one SAP table&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;&lt;BR /&gt;// Table: VBAK - Verkaufsbeleg&lt;BR /&gt;&lt;BR /&gt;if (isNull(vVBAKLastUDATE)) then&lt;BR /&gt;let vVBAKLastUDATE = '00000000';&lt;BR /&gt;end if&lt;BR /&gt;&lt;BR /&gt;if (isNull(vVBAKLastERDAT)) then&lt;BR /&gt;let vVBAKLastERDAT = '00000000';&lt;BR /&gt;end if&lt;BR /&gt;&lt;BR /&gt;// Neue Zeilen aus der Quelle laden&lt;BR /&gt;[VBAK]:&lt;BR /&gt;Load&lt;BR /&gt; [VBELN] as %VBELN,&lt;BR /&gt; [VBELN] as [VBELN_VERKAUFSBELEG],&lt;BR /&gt; [VKORG] as [VKORG_VERKAUFSORGANISATION],&lt;BR /&gt; [VKORG] as %VKORG,&lt;BR /&gt; [AUART] as [AUART_VERKAUFSBELEGART],&lt;BR /&gt; [VTWEG] as [VTWEG_VERTRIEBSWEG],&lt;BR /&gt; [AUGRU] as [AUGRU_AUFTRAGSGRUND],&lt;BR /&gt; [BSTDK] as [BSTDK_BESTELLDATUM],&lt;BR /&gt; [BSTNK] as [BSTNK_BESTELLNUMMER],&lt;BR /&gt; [BNAME] as [BNAME_NAME],&lt;BR /&gt; [ERDAT] as [ERDAT_ANGELEGT_AM],&lt;BR /&gt; [UDATE] as [UDATE_GEAENDERT_AM],&lt;BR /&gt; mid([ERDAT],1,4) as [ERDAT_YEAR];&lt;BR /&gt;SQL&lt;BR /&gt;SELECT VBAK~VBELN,VBAK~VKORG,VBAK~AUART,VBAK~AUGRU,VBAK~BSTDK,VBAK~BSTNK,VBAK~BNAME,VBAK~ERDAT,VBAK~KNUMV,VBAK~VTWEG,ZPMWM_AEND~UDATE&lt;BR /&gt;FROM ZPMWM_AEND&lt;BR /&gt;left join VBAK on ZPMWM_AEND~VBELN = VBAK~VBELN&lt;BR /&gt;where ZPMWM_AEND~TABNAME = 'VBAK'&lt;BR /&gt;and ZPMWM_AEND~UDATE &amp;gt;= '$(vVBAKLastUDATE)'&lt;BR /&gt;;&lt;BR /&gt;&lt;BR /&gt;VBAK_Temp:&lt;BR /&gt;noconcatenate&lt;BR /&gt;Load&lt;BR /&gt; [VBELN] as %VBELN_Temp,&lt;BR /&gt; [VBELN] as [VBELN_VERKAUFSBELEG],&lt;BR /&gt; [VKORG] as [VKORG_VERKAUFSORGANISATION],&lt;BR /&gt; [VKORG] as %VKORG,&lt;BR /&gt; [AUART] as [AUART_VERKAUFSBELEGART],&lt;BR /&gt; [VTWEG] as [VTWEG_VERTRIEBSWEG],&lt;BR /&gt; [AUGRU] as [AUGRU_AUFTRAGSGRUND],&lt;BR /&gt; [BSTDK] as [BSTDK_BESTELLDATUM],&lt;BR /&gt; [BSTNK] as [BSTNK_BESTELLNUMMER],&lt;BR /&gt; [BNAME] as [BNAME_NAME],&lt;BR /&gt; [ERDAT] as [ERDAT_ANGELEGT_AM],&lt;BR /&gt; [ERDAT] as [UDATE_GEAENDERT_AM],&lt;BR /&gt; mid([ERDAT],1,4) as [ERDAT_YEAR];&lt;BR /&gt;SQL&lt;BR /&gt;SELECT VBELN,VKORG,AUART,AUGRU,BSTDK,BSTNK,BNAME,ERDAT,KNUMV,VTWEG&lt;BR /&gt;FROM VBAK&lt;BR /&gt;where ERDAT &amp;gt;= '$(vVBAKLastERDAT)' OR AEDAT &amp;gt;= '$(vVBAKLastERDAT)'&lt;BR /&gt;//where ERDAT &amp;gt;= '$(vVBAKLastERDAT)' OR AEDAT &amp;gt;= 0100360360&lt;BR /&gt;;&lt;BR /&gt;&lt;BR /&gt;concatenate (VBAK)&lt;BR /&gt;Load&lt;BR /&gt; %VBELN_Temp,&lt;BR /&gt; %VBELN_Temp as %VBELN,&lt;BR /&gt; [VBELN_VERKAUFSBELEG],&lt;BR /&gt; [VKORG_VERKAUFSORGANISATION],&lt;BR /&gt; %VKORG,&lt;BR /&gt; [AUART_VERKAUFSBELEGART],&lt;BR /&gt; [VTWEG_VERTRIEBSWEG],&lt;BR /&gt; [AUGRU_AUFTRAGSGRUND],&lt;BR /&gt; [BSTDK_BESTELLDATUM],&lt;BR /&gt; [BSTNK_BESTELLNUMMER],&lt;BR /&gt; [BNAME_NAME],&lt;BR /&gt; [ERDAT_ANGELEGT_AM],&lt;BR /&gt; [UDATE_GEAENDERT_AM],&lt;BR /&gt; [ERDAT_YEAR],&lt;BR /&gt;1 as dummy&lt;BR /&gt;resident VBAK_Temp&lt;BR /&gt;where not exists(%VBELN,%VBELN_Temp);&lt;BR /&gt;&lt;BR /&gt;drop table VBAK_Temp;&lt;BR /&gt;drop fields dummy, [%VBELN_Temp];&lt;BR /&gt;&lt;BR /&gt;// Schleife über Jahre, um bereits gelesene Daten zu partitionieren&lt;BR /&gt;&lt;BR /&gt;for j = $(vStartJahr) to $(vAktJahr)&lt;BR /&gt;&lt;BR /&gt;let vQvdReadFlag = 0;&lt;BR /&gt;&lt;BR /&gt;if (isNull(vVBAKQvdEx$(j))) then&lt;BR /&gt;let vVBAKQvdEx$(j) = 1;&lt;BR /&gt;let vQvdReadFlag = -1;&lt;BR /&gt;end if&lt;BR /&gt;&lt;BR /&gt;[VBAK_$(j)]:&lt;BR /&gt;Load&lt;BR /&gt; %VBELN,&lt;BR /&gt; [VBELN_VERKAUFSBELEG],&lt;BR /&gt; [VKORG_VERKAUFSORGANISATION],&lt;BR /&gt; %VKORG,&lt;BR /&gt; [AUART_VERKAUFSBELEGART],&lt;BR /&gt; [VTWEG_VERTRIEBSWEG],&lt;BR /&gt; [AUGRU_AUFTRAGSGRUND],&lt;BR /&gt; [BSTDK_BESTELLDATUM],&lt;BR /&gt; [BSTNK_BESTELLNUMMER],&lt;BR /&gt; [BNAME_NAME],&lt;BR /&gt; [ERDAT_ANGELEGT_AM],&lt;BR /&gt; max([UDATE_GEAENDERT_AM]) as [UDATE_GEAENDERT_AM]&lt;BR /&gt;resident [VBAK]&lt;BR /&gt;where [ERDAT_YEAR] = '$(j)'&lt;BR /&gt;group by %VBELN, [VBELN_VERKAUFSBELEG], [VKORG_VERKAUFSORGANISATION], %VKORG, [AUART_VERKAUFSBELEGART], [VTWEG_VERTRIEBSWEG], [AUGRU_AUFTRAGSGRUND], [BSTDK_BESTELLDATUM], [BSTNK_BESTELLNUMMER], [BNAME_NAME], [ERDAT_ANGELEGT_AM]&lt;BR /&gt;;&lt;BR /&gt;&lt;BR /&gt;// Falls bereits eine QVD Datei für das Jahr $(j) existiert, QVD laden&lt;BR /&gt;// "Anhängen+Ändern" --&amp;gt; In der Quelle werden nur Inserts/Updates durchgeführt&lt;BR /&gt;if ($(vQvdReadFlag) &amp;gt;= 0) then&lt;BR /&gt;Load * FROM VBAK_$(j).qvd (qvd)&lt;BR /&gt;where not exists(%VBELN);&lt;BR /&gt;end if&lt;BR /&gt;&lt;BR /&gt;// QVD Datei mit neuen Zeilen speichern&lt;BR /&gt;store VBAK_$(j) into VBAK_$(j).qvd;&lt;BR /&gt;drop table VBAK_$(j);&lt;BR /&gt;&lt;BR /&gt;next&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;// Letzte ID ermitteln&lt;BR /&gt;&lt;BR /&gt;tmp:&lt;BR /&gt;load max([UDATE_GEAENDERT_AM]) as UPDATMax, max([ERDAT_ANGELEGT_AM]) as ERDATMax resident VBAK;&lt;BR /&gt;let vUPDATMax = peek('UPDATMax',-1,tmp);&lt;BR /&gt;let vERDATMax = peek('ERDATMax',-1,tmp);&lt;BR /&gt;&lt;BR /&gt;if (len('$(vUPDATMax)') &amp;lt;&amp;gt; 0) then&lt;BR /&gt;SET DateFormat='YYYYMMDD';&lt;BR /&gt;let vVBAKLastUDATE = date($(vUPDATMax));&lt;BR /&gt;SET DateFormat='DD.MM.YYYY';&lt;BR /&gt;end if&lt;BR /&gt;&lt;BR /&gt;if (len('$(vERDATMax)') &amp;lt;&amp;gt; 0) then&lt;BR /&gt;SET DateFormat='YYYYMMDD';&lt;BR /&gt;let vVBAKLastERDAT = date($(vERDATMax));&lt;BR /&gt;SET DateFormat='DD.MM.YYYY';&lt;BR /&gt;end if&lt;BR /&gt;&lt;BR /&gt;drop table tmp;&lt;BR /&gt;drop table [VBAK];&lt;BR /&gt;&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 May 2010 07:33:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Best-practice-for-SAP-Connector-5-2-in-QlikView/m-p/195009#M1229957</guid>
      <dc:creator />
      <dc:date>2010-05-28T07:33:39Z</dc:date>
    </item>
    <item>
      <title>AW:Re: Best practice for SAP Connector (5.2) in QlikView</title>
      <link>https://community.qlik.com/t5/QlikView/Best-practice-for-SAP-Connector-5-2-in-QlikView/m-p/195010#M1229960</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;OK. Good.&lt;/P&gt;&lt;P&gt;Now, there is a flag under Document Properties to generate the logfile upon execution. Could you please turn it on, if it's not already on, and when this VBAK extracts runs next time, grab log file generated in that folder and attach it here? That will tell use where exactly it's taking longer time.&lt;/P&gt;&lt;P&gt;I see it is joining with a "Z" table in the first SELECT. It very well could be an index problem as well. But that's what log file will tell us.&lt;/P&gt;&lt;P&gt;Rakesh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 May 2010 11:40:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Best-practice-for-SAP-Connector-5-2-in-QlikView/m-p/195010#M1229960</guid>
      <dc:creator>disqr_rm</dc:creator>
      <dc:date>2010-05-28T11:40:00Z</dc:date>
    </item>
    <item>
      <title>AW:Re: AW:Re: Best practice for SAP Connector (5.2) in QlikView</title>
      <link>https://community.qlik.com/t5/QlikView/Best-practice-for-SAP-Connector-5-2-in-QlikView/m-p/195011#M1229962</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Here is our logfile from yesterday. In the Z-table are all tables loged, where records were changed. here ist a screenshot &lt;A href="http://community.qlik.com/cfs-file.ashx/__key/CommunityServer.Discussions.Components.Files/27/2211.ZPMWM_5F00_AEND.png"&gt;&lt;IMG alt="" border="0" src="http://community.qlik.com/resized-image.ashx/__size/550x0/__key/CommunityServer.Discussions.Components.Files/27/2211.ZPMWM_5F00_AEND.png" /&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;And here is the logfile from the qlikview script.&lt;/P&gt;&lt;P&gt;[View:http://community.qlik.com/cfs-file.ashx/__key/CommunityServer.Discussions.Components.Files/27/2742.2_5F00_sap_5F00_jp6_5F00_qvd_5F00_delta.qvw.log:550:0]&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 May 2010 11:54:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Best-practice-for-SAP-Connector-5-2-in-QlikView/m-p/195011#M1229962</guid>
      <dc:creator />
      <dc:date>2010-05-28T11:54:01Z</dc:date>
    </item>
    <item>
      <title>AW:Re: AW:Re: Best practice for SAP Connector (5.2) in QlikView</title>
      <link>https://community.qlik.com/t5/QlikView/Best-practice-for-SAP-Connector-5-2-in-QlikView/m-p/195012#M1229964</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Florian,&lt;/P&gt;&lt;P&gt;Your script have some querys that takes very long time but returns onyl a few record.&lt;/P&gt;&lt;P&gt;At line 182 the following SQL takes 51 minutes and returns only 2.080 lines.&lt;/P&gt;&lt;P&gt;SELECT VBELN,VKORG,AUART,AUGRU,BSTDK,BSTNK,BNAME,ERDAT,KNUMV,VTWEG FROM VBAK&lt;/P&gt;&lt;P&gt;where ERDAT &amp;gt;= '20100526' OR AEDAT &amp;gt;= '20100526'&lt;/P&gt;&lt;P&gt;ERDAT stores the date when document was created and AEDAT stores the date when record was changed.&lt;/P&gt;&lt;P&gt;By default AEDAT is not an indexed field. Only ERDAT is indexed, then I think your query do a Table Full Scan to retrieve a few records.&lt;/P&gt;&lt;P&gt;This filter is already used at line 358 and 509. and these querys takes 50 minutes too.&lt;/P&gt;&lt;P&gt;The overall time to run these querys takes approximately 3 hours.&lt;/P&gt;&lt;P&gt;You have another bottleneck at line 113, but this query may be using an index because vbeln is part of the primary key.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT VBELN,BESTK,LFSTK,LFGSK,WBSTK,ABSTK,GBSTK,AEDAT&lt;/P&gt;&lt;P&gt;FROM VBUK&lt;/P&gt;&lt;P&gt;where ( ( VBELN between '0100490392' and '0199999999' )&lt;/P&gt;&lt;P&gt;or ( VBELN between '1200007042' and '1299999999' )&lt;/P&gt;&lt;P&gt;or ( VBELN between '1300007329' and '1399999999' ) )&lt;/P&gt;&lt;P&gt;8 fields found: VBELN_VERTRIEBSBELEG, BESTK_BESTÄTIGT, LFSTK_LIEFERSTATUS, LFGSK_GESAMTLIEFERSTATUS, WBSTK_GESWARENBEWEGUNGSTAT, ABSTK_ABSAGESTATUS, GBSTK_GESAMTSTATUS, AEDAT_GEÄNDERT_AM, 2.935.300 lines fetched&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This query takes 45 minutes to retrieve 2.9 milions lines.&lt;/P&gt;&lt;DIV&gt;Conclusion:&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;Try to modify the way you filter the records when retrieving data from VBAK. Why not use the z-table that log the updates. I see VBAK as one of the tables loged. May be this query could help you, using the z-table as the main filter:&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV&gt;SELECT VBAK~VBELN,VBAK~VKORG,VBAK~AUART,VBAK~AUGRU,&lt;/DIV&gt;&lt;DIV&gt;VBAK~BSTDK,VBAK~BSTNK,VBAK~BNAME,VBAK~ERDAT,&lt;/DIV&gt;&lt;DIV&gt;VBAK~KNUMV,VBAK~VTWEG&lt;/DIV&gt;&lt;DIV&gt;FROM VBAK&lt;/DIV&gt;&lt;DIV&gt;JOIN ZPMWM_AEND ON VBAK~VBELN = ZPMWM_AEND~VBELN&lt;/DIV&gt;&lt;DIV&gt;where ZPMWM_AEND~TABNAME = 'VBAK'&lt;/DIV&gt;&lt;DIV&gt;AND ZPMWM_AEND~UDATE &amp;gt;= '20100526'&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;Good Luck&lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 May 2010 15:01:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Best-practice-for-SAP-Connector-5-2-in-QlikView/m-p/195012#M1229964</guid>
      <dc:creator>pablolabbe</dc:creator>
      <dc:date>2010-05-28T15:01:48Z</dc:date>
    </item>
    <item>
      <title>AW:Re: Best practice for SAP Connector (5.2) in QlikView</title>
      <link>https://community.qlik.com/t5/QlikView/Best-practice-for-SAP-Connector-5-2-in-QlikView/m-p/195013#M1229966</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;This is right "Qlikview need 8 hours to extract, convert and agregate data since 2006, and for each day you have 270.000 records". One of our QVD file, for example "VBAK_2010.qvd" is 24 MB large, and the QVD file "VBAK_2009.qvd" is 70 MB large. An other question: We have a six cluster SAP system, but our connections is static by IP. Is there a way to use load balancing in QV? Thanks for your help and ideas.&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 31 May 2010 12:29:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Best-practice-for-SAP-Connector-5-2-in-QlikView/m-p/195013#M1229966</guid>
      <dc:creator />
      <dc:date>2010-05-31T12:29:14Z</dc:date>
    </item>
  </channel>
</rss>

