Author |
Message
|
santy |
Posted: Fri Jul 17, 2009 2:58 pm Post subject: SELECT statement without PASSTHRU in WMB 6.0 - URGENT |
|
|
Centurion
Joined: 03 Nov 2006 Posts: 141
|
Hi,
I'm using SELECT statement to select the data from Database without PASSTHRU. Is there any possibility of DB deadlock ?
or what are the disadvantages of using such SELECT's.
can anybody please suggest urgently?
Thanks. |
|
Back to top |
|
 |
Vitor |
Posted: Fri Jul 17, 2009 11:13 pm Post subject: Re: SELECT statement without PASSTHRU in WMB 6.0 - URGENT |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
santy wrote: |
I'm using SELECT statement to select the data from Database without PASSTHRU. Is there any possibility of DB deadlock ? |
There's always a passibility of DB deadlock. This is true for using PASSTHRU or not PASSTHRU, using WMB or not using WMB. Any access of the database by any means can cause deadlock, the DBAs will act to prevent this and the normal strategies to avoid it remain true for WMB as they would for any application.
In the same way doing a select in WMB (via PASSTHRU or not) that results in a Cartisian join is as bad an idea as it is in a C or Java app.
santy wrote: |
or what are the disadvantages of using such SELECT's.
|
What are the advantages of using PASSTHRU?  _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
smdavies99 |
Posted: Sat Jul 18, 2009 8:30 am Post subject: Re: SELECT statement without PASSTHRU in WMB 6.0 - URGENT |
|
|
 Jedi Council
Joined: 10 Feb 2003 Posts: 6076 Location: Somewhere over the Rainbow this side of Never-never land.
|
vitor wrote: |
What are the advantages of using PASSTHRU?  |
The biggest (IMHO) advantage of using PASSTHRU comes when you are having READ LOCK problems on a table. This can easily rear its ugly head if you are using a flow configured to use additiional instances.
Using PASSTHRU, you can add the required SQL for that database so that the read is performed without implicit locks being granted.
It would be difficult to do that in Pure ESQL as different databases use a different syntax to acheive the same ends.
You could possibly do it via stired procedures but different companies have different approaches to the use of them. One place I have done work for virtually insists that EVERYTHING is done by SP even simple selects from DUAL (oracle). Another is the opposite and unless you lick the shoes of the head DBA for a year or so they really uppity when they find SP's being crated on their systems (even in a Dev environment)
Anyway, thats my 2c worth. _________________ 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 |
|
 |
Vitor |
Posted: Sat Jul 18, 2009 9:23 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
So that's the poster's answer then....  _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
jbanoop |
Posted: Sun Jul 19, 2009 7:11 am Post subject: |
|
|
Chevalier
Joined: 17 Sep 2005 Posts: 401 Location: SC
|
I guess using SELECT without PASSTHRU makes the ESQL code DB independant while PASSTHRU statements would be specific to different DB products. |
|
Back to top |
|
 |
smdavies99 |
Posted: Sun Jul 19, 2009 7:34 am Post subject: |
|
|
 Jedi Council
Joined: 10 Feb 2003 Posts: 6076 Location: Somewhere over the Rainbow this side of Never-never land.
|
jbanoop wrote: |
I guess using SELECT without PASSTHRU makes the ESQL code DB independant while PASSTHRU statements would be specific to different DB products. |
That is certainly true.
Broker is aimed at high performance systems. Risking the wrath of some DBA's i have worked with to ensure DB portability (by not using PASSTHRU) is not something I'd want to happen every day. To me, providing the most efficient and risk free solutino to a problem/requirement is my aim. However, if the powers that be (usually a PHB) dictate otherwise then so be it. As long as I have done the requisite CYA I'd be happy.
 _________________ 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 |
|
 |
|