Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

optimize loading script

The follwoing script took much time to be executed , how coul I optimize it ?

OC:

LOAD [OC] ,DEBUT

      ,FIN ;

SQL SELECT distinct  [OC]

      ,[DATE DEBUT] AS [DEBUT]

      ,[DATE FIN] AS [FIN]

    

FROM [QlikDataWarehouse].[dbo].[OC]

WHERE [Code Article] IS NOT NULL ;

TempVente:

LOAD PrixUnitaireArticle,

     PrixArticleHT,

datecol,

     PrixRevientTTC

FROM

E:\QVD TEST OC\Vente.qvd

(qvd);

LEFT  JOIN(TempVente)

IntervalMatch (datecol)

LOAD DISTINCT [DATE DEBUT]

      ,[DATE FIN]

resident      OC

      ;

//drop table OC;

6 Replies
Clever_Anjos
Employee
Employee

Do you know which step is taking longer times?

Anonymous
Not applicable
Author

there is a sync table which is created between oc and tempvente , but when I add drop table OC; the code execution time is less than usual but I lost the field oc

marcus_malinow
Partner - Specialist III
Partner - Specialist III

IntervalMatch (datecol)

Where is datecol created?

Anonymous
Not applicable
Author

i update my question

marcus_malinow
Partner - Specialist III
Partner - Specialist III

That's better!

Also, in your initial load of OC you have fields DEBUT and FIN, but refer to these as [DATE DEBUT] and [DATE FIN] in your IntervalMatch.

However, after your IntervalMatch

LEFT JOIN (TempVente)

LOAD *

RESIDENT OC;

DROP TABLE OC;

This should be quicker than the generation of a synthetic key.

PradeepReddy
Specialist II
Specialist II

remove the Left Join condition code in intervalmatch condition and try to load.. it will create a synthetic key, but it is valid one.

LEFT  JOIN(TempVente)

IntervalMatch (datecol)

LOAD DISTINCT [DEBUT]

                          ,[FIN]

resident OC  ;