Skip to main content
Announcements
Live today at 11 AM ET. Get your questions about Qlik Connect answered, or just listen in. SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Does Previous & Peek make a load run slow ?

Hi

I have this load statement below

LOAD

  [Employee Environment Key] ,

///////////////// It is the line below which makes this load statement run slow

  if ( previous([SCD Employee RSMS BU]) = [SCD Employee RSMS BU], peek('SCD Counter'),rangesum(1,peek('SCD Counter'))) as [SCD Counter] ,

  [SCD Environment] ,

  [SCD Environment Employee Key] ,

  [SCD Employee Number] ,

  [SCD Employee Active] ,

  [SCD Date] ,

  [SCD Employee RSMS BU] , 

  [SCD EE Current RSMS BU] ,

  [SCD Leave Date]

resident Temp01

order by

  [SCD Environment Employee Key] ,

  [SCD Date] ,

  [SCD Employee RSMS BU]

;

When I comment out the if ( previous... line it runs about 5 times faster.

Is this what one would expect ?

If not, then any suggestions for improvement ?

Best Regards,     Bill

2 Replies
marcus_sommer

Generally I would think it will be slower as without these functions but in this case it is the only transformation and hence it will prevent an optimize load. I use these functions by several loads over X million rows and the perfomance is ok. - rot really slower as without them, except it prevent an optimize load.

- Marcus

Anonymous
Not applicable
Author

Marcus

I too would expect it to be slower with the transformation line, but 5 times slower seems a bit excessive to me.

It is loading from resident, so by definition it will never be an optimised load.

Best Regards,     Bill