Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Optimize IF Statement

Is there a better way to right this IF Statement? This load currently takes 40 minutes on 10 Millions records.

InterfaceTraffic1:

Load

*, IF(sum(InBandwidth)+sum(OutBandwidth)=0,0,

IF(sum(InBandwidth)=0,sum(OutBandwidth/OutBandwidth) * 100,

IF(sum(OutBandwidth),(sum(In_Averagebps)/sum(InBandwidth)) * 100,

sum(Out_Averagebps/OutBandwidth)+sum(In_Averagebps/InBandwidth)*50))) AS AVERAGE_of_CircuitUtil_AvgRecvXmit2

RESIDENT InterfaceTrafficDetailTemp

GROUP BY InterfaceID, NodeID,In_Averagebps,Out_Averagebps,InBandwidth,OutBandwidth,InterfaceName,BandwidthandCircuit;

1 Reply
Not applicable
Author

Hi,

This is not what you are asking exactly, but just another idea:

Did you try storing the resident InterfaceTrafficDetailTemp table into a qvd file, and then load the InterfaceTraffic1 table from the qvd file?

Regards,