Page 1 of 1

Stage Variables..Curious on how it will affect performance

Posted: Thu Jun 28, 2007 10:47 pm
by cosec
Is it better to use stage variables when you can do the same thing without using it ?

Posted: Thu Jun 28, 2007 10:51 pm
by ArndW
If you define a stage variable and then use that variable in only one derivation you will have a bit more overhead than by doing the computation directly in the derivation. If you use the stage variable result more than once (be it a derivation or a constraint or another stage variable) then is more efficient to do so. The performance differences may seem minor but really add up since they get executed for each row.

Posted: Fri Jun 29, 2007 4:26 am
by vmcburney
I often use stage variables when I don't need to for complex derivation code. I don't think there is much overhead and it can really help to document and organize the code in the stage. You can for example add a comment and a naming convention to a stage variable.

Posted: Fri Jun 29, 2007 6:11 am
by chulett
I fall into the McBurney camp when it comes to stage variables, it seems. :wink: