Hi, thanks for reading.
anyone know what happening behind the scenes when data is passed by value vs passed by reference? In my case I'm using a LongNVarChar field in a db2 connector that can be passed by value or by reference. I'm not sure what's going to happen under the covers. Any help is greatly appreciated.
my test job
db2 connector => XML stage => peek
pass by reference vs pass by value
Moderators: chulett, rschirm, roy
Lots of references to it out in the wild, here's what a quick search turned up for Java but it should apply to DB2 as well for a LOB:
http://www.javacertificate.net/passbyvalue.htm
http://www.javacertificate.net/passbyvalue.htm
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers
Basically it comes down to passing the actual data value or passing a pointer to the memory location that contains the data value.
For large data elements (arrays / CLOBS / BLOBS) passing by reference can be much faster as all it sends is a pointer to the start of the data element and says "go look here for it".
For large data elements (arrays / CLOBS / BLOBS) passing by reference can be much faster as all it sends is a pointer to the start of the data element and says "go look here for it".
I have already read the DS documentation and did my own google research, it certainly gives you an idea on what's happening at a high level, but was wanting to dive deeper. I'll keep looking and report back to this post If I find anything worth reporting.
Thanks chulett and asorrell for your response.
Thanks chulett and asorrell for your response.