Page 1 of 1

Usage os Space function

Posted: Thu May 05, 2011 2:12 pm
by sumesh.abraham
Hello all,

I am analyzing a paralel job for performance improvemnets. I have found that in the transformer stage there is a filter which does input column value <> Space(1). Is there any performance benefit in using Space(1) rather than directly checking cinput column value <> ' '

Posted: Thu May 05, 2011 3:44 pm
by ray.wurlod
There is actually a cost, that of evaluating the function every row. So a comparison against the literal string will be slightly more efficient. Many instances of "slightly" add to a useful amount.

For a slightly more complex example, initialize a stage variable to the result of the function and do not have a derivation expression for that stage variable. That way the function is evaluated only once per run.