ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Database inserts frequency for high volumes - RT or batch?

Post new topic  Reply to topic
 Database inserts frequency for high volumes - RT or batch? « View previous topic :: View next topic » 
Author Message
pratik_oze
PostPosted: Sun Jun 17, 2012 9:53 am    Post subject: Database inserts frequency for high volumes - RT or batch? Reply with quote

Apprentice

Joined: 22 Jun 2004
Posts: 34

We receive high volumes of messages in a second. One of the flow is currently designed to make external oracle database inserts. This is taking a long time than expected and hence piling s observed on the MQ queue.

This database inserts are done real time(RT). Is this the right approach in WMB for such high volumes or will a batch insert approach must be followed?

Any pointers please.
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Sun Jun 17, 2012 11:39 am    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

It might help if we had an idea of how the insert into the DB was coded...
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
smdavies99
PostPosted: Sun Jun 17, 2012 12:14 pm    Post subject: Reply with quote

Jedi Council

Joined: 10 Feb 2003
Posts: 6076
Location: Somewhere over the Rainbow this side of Never-never land.

As a general rule of thumb, using a Stored Procedure to do the inserts will be slightly faster than not using one.
Another point to think about is if the insert also requires some reads from associated tables, these may very well issue DB locks against the table. you can speed up this part if it is for reference only to use a READONLY select.

But as has already been said, we need to know how the DB insert is coded.
_________________
WMQ User since 1999
MQSI/WBI/WMB/'Thingy' User since 2002
Linux user since 1995

Every time you reinvent the wheel the more square it gets (anon). If in doubt think and investigate before you ask silly questions.
Back to top
View user's profile Send private message
pratik_oze
PostPosted: Sun Jun 17, 2012 8:37 pm    Post subject: Database inserts frequency for high volumes - RT or batch? Reply with quote

Apprentice

Joined: 22 Jun 2004
Posts: 34

Passthru has been used in the esql codes to make the inserts.
Back to top
View user's profile Send private message
Vitor
PostPosted: Mon Jun 18, 2012 4:38 am    Post subject: Re: Database inserts frequency for high volumes - RT or batc Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

pratik_oze wrote:
Passthru has been used in the esql codes to make the inserts.


Yes, but how is the insert coded? I agree that within the strictest interpretation the question "how has the insert been coded?" can be correctly be answered with "it's been coded with a passthru" but that's as accurate & as much use as a Microsoft Technote!

What insert code are you passing through?

Better information, better advice.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
lancelotlinc
PostPosted: Mon Jun 18, 2012 5:08 am    Post subject: Reply with quote

Jedi Knight

Joined: 22 Mar 2010
Posts: 4941
Location: Bloomington, IL USA

WMB does not handle database operation well, especially when ramping up volumes. You'll get better performance, throughput, and connection utilization if you follow one of two options: [1] front-end your database calls with a Web Service facade and use the SOAPRequest node to process your database operations -or- [2] use solidDb as your database backed by your DB2 instance. WMB does not manage database connections well and you should avoid accessing a database directly from WMB.
_________________
http://leanpub.com/IIB_Tips_and_Tricks
Save $20: Coupon Code: MQSERIES_READER
Back to top
View user's profile Send private message Send e-mail
mqjeff
PostPosted: Mon Jun 18, 2012 5:10 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

lancelotlinc wrote:
WMB does not manage database connections well and you should avoid accessing a database directly from WMB.

You are extrapolating a general rule from your particular experience, and advocating a design goal based on your own architectural principles, rather than on a sound design based on the implementer's situation.
Back to top
View user's profile Send private message
lancelotlinc
PostPosted: Mon Jun 18, 2012 5:12 am    Post subject: Reply with quote

Jedi Knight

Joined: 22 Mar 2010
Posts: 4941
Location: Bloomington, IL USA

mqjeff wrote:
lancelotlinc wrote:
WMB does not manage database connections well and you should avoid accessing a database directly from WMB.

You are extrapolating a general rule from your particular experience, and advocating a design goal based on your own architectural principles, rather than on a sound design based on the implementer's situation.


Working off of the information provided in the question, I answered to the best of my ability and experience. Some people may have differing opinions. The OP asked for pointers. I advocate two pointers: Web Service facade or solidDb. Both of these pointers are IBM products.
_________________
http://leanpub.com/IIB_Tips_and_Tricks
Save $20: Coupon Code: MQSERIES_READER
Back to top
View user's profile Send private message Send e-mail
mqjeff
PostPosted: Mon Jun 18, 2012 5:18 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

lancelotlinc wrote:
I advocate two pointers: Web Service facade or solidDb. Both of these pointers are IBM products.

Neither of these make sense if the original poster is an iSeries shop.

Wrapping all of your functional endpoints in webservice facades is not the solution to all problems. It works well in certain kinds of situations.

Implementing solidDB to frontend db2 on zOS to increase performance, when you could instead just tune the db2 connect client does not make sense.
Back to top
View user's profile Send private message
smdavies99
PostPosted: Mon Jun 18, 2012 5:18 am    Post subject: Reply with quote

Jedi Council

Joined: 10 Feb 2003
Posts: 6076
Location: Somewhere over the Rainbow this side of Never-never land.

lancelotlinc wrote:
WMB does not handle database operation well, especially when ramping up volumes. You'll get better performance, throughput, and connection utilization if you follow one of two options: [1] front-end your database calls with a Web Service facade and use the SOAPRequest node to process your database operations -or- [2] use solidDb as your database backed by your DB2 instance. WMB does not manage database connections well and you should avoid accessing a database directly from WMB.


You seem to have skipped/ignored the bit on the original post where Oracle is mentioned at the back end DB and not DB2
_________________
WMQ User since 1999
MQSI/WBI/WMB/'Thingy' User since 2002
Linux user since 1995

Every time you reinvent the wheel the more square it gets (anon). If in doubt think and investigate before you ask silly questions.
Back to top
View user's profile Send private message
lancelotlinc
PostPosted: Mon Jun 18, 2012 5:21 am    Post subject: Reply with quote

Jedi Knight

Joined: 22 Mar 2010
Posts: 4941
Location: Bloomington, IL USA

smdavies99 wrote:
lancelotlinc wrote:
WMB does not handle database operation well, especially when ramping up volumes. You'll get better performance, throughput, and connection utilization if you follow one of two options: [1] front-end your database calls with a Web Service facade and use the SOAPRequest node to process your database operations -or- [2] use solidDb as your database backed by your DB2 instance. WMB does not manage database connections well and you should avoid accessing a database directly from WMB.


You seem to have skipped/ignored the bit on the original post where Oracle is mentioned at the back end DB and not DB2


I was presenting options as a general guide. You could easily substitute solidDb for Oracle's equivalent, which is TimesTen.
_________________
http://leanpub.com/IIB_Tips_and_Tricks
Save $20: Coupon Code: MQSERIES_READER
Back to top
View user's profile Send private message Send e-mail
lancelotlinc
PostPosted: Mon Jun 18, 2012 5:30 am    Post subject: Reply with quote

Jedi Knight

Joined: 22 Mar 2010
Posts: 4941
Location: Bloomington, IL USA

mqjeff wrote:
lancelotlinc wrote:
I advocate two pointers: Web Service facade or solidDb. Both of these pointers are IBM products.

Neither of these make sense if the original poster is an iSeries shop.

Wrapping all of your functional endpoints in webservice facades is not the solution to all problems. It works well in certain kinds of situations.

Implementing solidDB to frontend db2 on zOS to increase performance, when you could instead just tune the db2 connect client does not make sense.


Lets say for example a message flow makes three database connections. Then, for throughput sake, you ramp up the additional instances of that message flow to nine additional instances, for a total of ten. How many database connections will result? Ten times three is thirty. Lets say that is MessageFlow called MessageFlow A. Lets say you have more message flows that need to interact with the database. MessageFlows B, C, D, E, F, G, H, I, J. Lets say each of those message flows has three connections and nine additional instances. Now how many database connections do you have? Thirty times ten flows is 300 connections.

Now lets say you facade your database connections with a Web Service. If the facade needs only one connection (highly likely), how many database connections do you need from your ten flows with ten instances? One. 300 vs. one.

For simplicity sake, I would like WMB to handle my database operations. But due to the poor way the database connections are managed in WMB version 7, it is not possible.
_________________
http://leanpub.com/IIB_Tips_and_Tricks
Save $20: Coupon Code: MQSERIES_READER
Back to top
View user's profile Send private message Send e-mail
fjb_saper
PostPosted: Mon Jun 18, 2012 6:52 am    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

And let's not forget that best practice tells us to not use passthru to call a stored procedure but to declare it as external type database....
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Database inserts frequency for high volumes - RT or batch?
Jump to:  



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
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.