Skip to main content
Announcements
Qlik Connect 2025: 3 days of full immersion in data, analytics, and AI. May 13-15 | Orlando, FL: Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

optimize load script

How could replace where condition in the following script in order to optimize loading script ?

  1. Vente:   
  2. LOAD PrixUnitaireArticle,  
  3.      PrixArticleHT,  
  4.      PrixRevientTTC,  
  5.      MargeHT,  
  6.      MargeTTC,  
  7.      ValeurRevientHT,  
  8.      ValeurRevientTTC,  
  9.      ValeurMargeHT,  
  10.      ValeurMargeTTC,  
  11.      PrixVenteHT,  
  12.      N°tickets,  
  13.      EAN,  
  14.      [Code Caisse],  
  15.      [Code Site],  
  16.      [Prix de vente TTC],  
  17.      Quantité,  
  18.      [Date Time],  
  19.      Promo,  
  20.      [Code Article],  
  21.      [Code Structure],  
  22.      Alimentaire,  
  23.      [Prix de Revient],  
  24.      TVA,  
  25.      DivKey,  
  26.      ID,  
  27.      DateOfHire,  
  28.      nbrClient, 
  29.      KeyVenteSite, 
  30.      code4 , 
  31.      datecol, 
  32.      Date(Date#(Date,'YYYY-MM-DD'),'YYYYMMDD') as Date
  33.      Date#(Date,'YYYY-MM-DD') as DateTest , 
  34.      ApplyMap('MapComp', datecol&[Code Site]&code4 , 'O') as Comp, 
  35.      ApplyMap('MapCasse', [Code Site]&[Code Article]&Date(Date#(Date,'YYYY-MM-DD'),'YYYYMMDD')  ,0) as QuantiteCasse, 
  36.      ApplyMap('MapAjust', [Code Site]&[Code Article]&Date(Date#(Date,'YYYY-MM-DD'),'YYYYMMDD')  ,0) as QuantiteAjust 
  37.  
  38.  
  39. FROM 
  40. E:\QVD\QVD\VenteFull.qvd 
  41. (qvd) 
  42. Where (isnull([Code Article]) = 0) and (isnull([Code Structure]) = 0) and (isnull([Prix de Revient])=0); 
5 Replies
roger_stone
Creator III
Creator III

The WHERE clause isn't the problem, it's the functions that you're using that will cause the load to be unoptimised.

tresesco
MVP
MVP

Replacing the where clause alone would not make this load an optimized one. Because you are applying some functions on the loaded field and modifying the values, and this modifications are causing it to make an unoptimzed one. Read this blog by stevedark : http://www.quickintelligence.co.uk/qlikview-optimised-qvd-loads/ for more in details.

Anonymous
Not applicable
Author

what you mean about functions ?

Peter_Cammaert
Partner - Champion III
Partner - Champion III

You could first load the entire QVD in memory, and then process/filter whatever you need. Loading from disk in an unoptimized way is often much slower than loading straightaway, and processing in RAM.

roger_stone
Creator III
Creator III

DATE(), DATE#() and APPLYMAP() are all functions.