Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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;
Do you know which step is taking longer times?
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
IntervalMatch (datecol)
Where is datecol created?
i update my question
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.
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 ;