Stage Variables..Curious on how it will affect performance
Moderators: chulett, rschirm, roy
Stage Variables..Curious on how it will affect performance
Is it better to use stage variables when you can do the same thing without using it ?
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.
<a href=http://www.worldcommunitygrid.org/team/ ... TZ9H4CGVP1 target="WCGWin">
</a>
</a>
-
- Participant
- Posts: 3593
- Joined: Thu Jan 23, 2003 5:25 pm
- Location: Australia, Melbourne
- Contact:
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.
Certus Solutions
Blog: Tooling Around in the InfoSphere
Twitter: @vmcburney
LinkedIn:Vincent McBurney LinkedIn
Blog: Tooling Around in the InfoSphere
Twitter: @vmcburney
LinkedIn:Vincent McBurney LinkedIn