Qlik Community

Ask a Question

App Development

Discussion board where members can learn more about Qlik Sense App Development and Usage.

Announcements
QlikWorld Online 2021, May 10-12: Our Free, Virtual, Global Event REGISTER TODAY
cancel
Showing results for 
Search instead for 
Did you mean: 
olguita2014
Creator
Creator

optimize the script

Hi,

 

Please help me!!!!... I whan to optimize my sentences of my script:

VEH_STOCK:
Load Distinct
Clave_CompraDetalle_Kardex_Vehiculo,
If(Sum(Cantidad_Saldo)=0,'Sin Saldo','Con Saldo') as Estado_Saldo
Resident VEH_KARDEX
Group By Clave_CompraDetalle_Kardex_Vehiculo,Fecha_Kardex;

 

This code has problems of optimization, What can I do to change the script?

Labels (2)
2 Replies
pradosh_thakur
Master II
Master II

VEH_STOCK:
load Clave_CompraDetalle_Kardex_Vehiculo,
Fecha_Kardex,
If(Sum(Cantidad_Saldo)=0,'Sin Saldo','Con Saldo') as Estado_Saldo,
Group By Clave_CompraDetalle_Kardex_Vehiculo,Fecha_Kardex;
Load Distinct
Clave_CompraDetalle_Kardex_Vehiculo,
Fecha_Kardex,
Cantidad_Saldo
Resident VEH_KARDEX
Order By Clave_CompraDetalle_Kardex_Vehiculo,Fecha_Kardex;

 

Have a look at the document

https://community.qlik.com/t5/QlikView-Documents/Optimize-Group-By-Performance/ta-p/1481470/page/2/s...

Learning never stops.
Anil_Babu_Samineni

@pradosh_thakur  Qlik internally optimize as always using Order By clause. Preferably like

Temp: // Temp table applied descending order with all rows from fields mentioned
Load Clave_CompraDetalle_Kardex_Vehiculo, Fecha_Kardex, Cantidad_Saldo
Resident VEH_KARDEX
Order By Clave_CompraDetalle_Kardex_Vehiculo,Fecha_Kardex;
VEH_STOCK: // This is the final table,
Where It can optimize the way of concepts with aggregate functions
NoConcatenate load Clave_CompraDetalle_Kardex_Vehiculo, Fecha_Kardex, If(Sum(Cantidad_Saldo)=0,'Sin Saldo','Con Saldo') as Estado_Saldo, Group By Clave_CompraDetalle_Kardex_Vehiculo,Fecha_Kardex;

 

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)