If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > MQSEND in DB2

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 12-14-06, 04:26
Maheshmohan Maheshmohan is offline
Registered User
 
Join Date: Dec 2006
Posts: 2
MQSEND in DB2

Hi ,
While using MQSEND in DB2 trigger to capture the changes and write into an MQ.
The CPU consumption is huge.Is there any way to tune this.

Stats:

12000 updates to a table without this MQ trigger .27 CPU and .20 elapsed time

12000 updates to a table with this MQ trigger 1.07 CPU and 10.4 elapsed time

Potential reason could be

The DB2 built in function might use MQPUT1 which will open MQ, write a message and close it
hence 12000 updates will have 12000 MQOPEN , 12000 MQPUT and 12000 MQCLOSE

the same if it is possible to implement with 1 MQOPEN , 12000 MQPUT and 1 MQCLOSE. F

If anyone could help me on this

Please mail to maheshk.mohan@gmail.com as well
Reply With Quote
  #2 (permalink)  
Old 12-17-06, 07:00
sathyaram_s sathyaram_s is offline
Super Moderator
 
Join Date: Aug 2001
Location: UK
Posts: 4,534
Following is the response for the above by Phil Nelson - a well known DB2 expert ..

"
I would expect that it does have to do an MQOPEN, MQPUT and MQCLOSE for each
call, since this needs to be a discrete Unit Of Work.

If you want to capture all changes to a table onto MQ then this just isn't the
way to do this. Instead you should be looking at the publication (or
transmission : depends on requirement) facilities available within
Information Integrator Q Replication. That would then perform more like the
OPEN, many PUTs, CLOSE examples.

We do use MQSEND to transmit onto MQ, but in a stored procedure where we do a
huge amount of SQL processing first and therefore the actual MQ call is much less.
"

HTH

Sathyaram
__________________
Visit the new-look IDUG Website , register to gain access to the excellent content.
Reply With Quote
  #3 (permalink)  
Old 12-17-06, 07:24
Maheshmohan Maheshmohan is offline
Registered User
 
Join Date: Dec 2006
Posts: 2
hi ,
Can anyone provide brief decription on the below functionalities

If you want to capture all changes to a table onto MQ then this just isn't the
way to do this. Instead you should be looking at the publication (or
transmission : depends on requirement) facilities available within
Information Integrator Q Replication. That would then perform more like the
OPEN, many PUTs, CLOSE examples.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On