1 Reply Latest reply: Aug 29, 2014 1:41 PM by Rob Wunderlich RSS

    Performance: ApplyMap in Preceding Map

    Bill Markham

      Hi

       

      I have noticed that this script runs about 4 times slower than the script at the bottom :

       

      Load

      ApplyMap ( 'MapSicknessHours' , [SCD Environment Date Employee Key] , 0 ) as [Sickness Hours] ,

      *

      ;

      Load

        [SCD Environment] & '|' &  [Date] & '|' &  [SCD Employee Number] as [SCD Environment Date Employee Key]  ,

        *

      resident Temp10

      ;

       

      Whereas eliminating the Preceding Load is 4 times faster :

       

      Load

       

        ApplyMap ( 'MapSicknessHours' , [SCD Environment] & '|' &  [Date] & '|' &  [SCD Employee Number] , 0 ) as [Sickness Hours]
      resident Temp10
       

      ;

       

       

      I am curious as to why is the case.  Any ideas anybody ?

       

      Normally I love preceding loads, but not in this case.

       

       

      Best Regards,     Bill

        • Re: Performance: ApplyMap in Preceding Map
          Rob Wunderlich

          Hi Bill,

           

          The two scripts are not comparable.  In the preceding load, you are keeping the additional field "SCD Environment Date Employee Key".  It's a large string field, so could have significant impact on performance. An interesting comparison would be to not use * on the top load, but list the fields and don't keep "SCD Environment Date Employee Key".

           

          In any case, I don't recommend using Preceding load in this scenario (adding one field). There is no benefit.

           

          -Rob