2 Replies Latest reply: Mar 6, 2014 11:48 AM by Bill Markham RSS

    Does Previous & Peek make a load run slow ?

    Bill Markham



      I have this load statement below



        [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