|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
Regarding Select and while statement |
« View previous topic :: View next topic » |
Author |
Message
|
Vijji |
Posted: Tue Aug 01, 2006 5:47 am Post subject: Regarding Select and while statement |
|
|
 Voyager
Joined: 30 Aug 2005 Posts: 83
|
Hi All,
In my present flow I have to access an XML file which has repeating transaction records. My Input file is as follows.
<Data>
<Transaction>
<ID>123</ID>
<Type>
<Name>abc</Name>
</Type>
<Type>
<Name>xyz</Name>
</Type>
</Transaction>
<Transaction>
<ID>101</ID>
<Type>
<Name>abcd</Name>
</Type>
</Transaction>
</Data>
To access each of these transaction records I am using select statement. But i can do the same using while loop.Which is the better way to access transaction records.
Thanks in adavance
Vijji |
|
Back to top |
|
 |
jefflowrey |
Posted: Tue Aug 01, 2006 5:50 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
Better under what criteria? _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
Vijji |
Posted: Tue Aug 01, 2006 5:52 am Post subject: |
|
|
 Voyager
Joined: 30 Aug 2005 Posts: 83
|
Hi Jeff,
Thanks for ur reply. In the performance point of view which statement is better.
Regards,
Vijji |
|
Back to top |
|
 |
jefflowrey |
Posted: Tue Aug 01, 2006 5:57 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
If your performance criteria is to process one message a second, they will both be equal.
In general, I would expect that the loop USING REFERENCES will perform faster than using a set of Select statements, if only because you will not be starting at the top of the tree each time.
But if you have real world performance goals, then you should test both and compare the results yourself against your data and on your hardware. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
|
|
 |
|
Page 1 of 1 |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|
|
|