|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
Create VS Set Statement |
« View previous topic :: View next topic » |
Author |
Message
|
sugan87 |
Posted: Tue Aug 02, 2016 12:06 am Post subject: Create VS Set Statement |
|
|
Novice
Joined: 14 Jul 2016 Posts: 18
|
What is the deference between the below two statement. Both are providing the same output. Which is best practice.
1)
CREATE FIELD OutputRoot.XMLNSC.BankCustomer;
CREATE FIRSTCHILD OF OutputRoot.XMLNSC.BankCustomer NAME 'KEY' VALUE InputRoot.XMLNSC.Customer.Key
2) Set OutputRoot.XMLNSC.BankCustomer.Key = InputRoot.XMLNSC.Customer.Key |
|
Back to top |
|
 |
timber |
Posted: Tue Aug 02, 2016 3:11 am Post subject: |
|
|
 Grand Master
Joined: 25 Aug 2015 Posts: 1292
|
What are your own thoughts? |
|
Back to top |
|
 |
Bichu |
Posted: Tue Aug 02, 2016 3:12 am Post subject: |
|
|
Centurion
Joined: 16 Oct 2011 Posts: 124 Location: London
|
First One.
When you are having xml attributes or namespaces, it wont copy if you use the second option. Also, its good to specify the DOMAIN attribute when creating first child. |
|
Back to top |
|
 |
sugan87 |
Posted: Tue Aug 02, 2016 4:53 am Post subject: |
|
|
Novice
Joined: 14 Jul 2016 Posts: 18
|
thank you guys,
Process wise how this two statement will differ? which is best in performance? |
|
Back to top |
|
 |
mqjeff |
Posted: Tue Aug 02, 2016 6:38 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
Which is better in performance?
The one that your performance tests indicate is better in performance.
Using a CREATE statement exclusively may work just fine, as long as you don't end up creating more elements than you need.
Using a CREATE statement gives you more control over what you create and where, and you can do "more things" in one command. But as your example shows, you need to create two elements - the parent element and the child element - in two statements. Whereas the set statement is a single statement.
But the single statement still has to create both elements, unless the parent is already created. _________________ chmod -R ugo-wx / |
|
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
|
|
|
|