|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
ESQL Select Statement vs Passthru Statement |
« View previous topic :: View next topic » |
Author |
Message
|
WMBSAM |
Posted: Tue Feb 16, 2016 6:21 am Post subject: ESQL Select Statement vs Passthru Statement |
|
|
 Voyager
Joined: 02 Oct 2009 Posts: 90 Location: Atlanta
|
Recently implemented a change which required to retrieve data from Database for which i have used ESQL select statements rather than passthru statement but during performance testing the whole Execution got hung when changed to passthru the same load worked like charm
Code: |
SELECT F.X AS OZC,F.Y AS DPC FROM Database.XYZ AS F where F.X= aAND F.Y=b
AND F.c= '1'
PASSTHRU('SELECT F.X AS OZC,F.Y AS DPC FROM XYZ AS F WHERE F.X= ? AND F.Y= ? AND F.c= ?' VALUES(OriginZipCode,DestinationZipCode,'1'));
|
curious to know what difference it made behind the scenes that passthru worked but not Select statment during performance test?? |
|
Back to top |
|
 |
manoj5007 |
Posted: Fri Mar 04, 2016 12:41 am Post subject: |
|
|
 Acolyte
Joined: 15 May 2013 Posts: 64
|
I think the difference is when we use SELECT the resultset is getting loaded as an when the results are produced by the DB, but when using PASSTHRU, the state is executed first to fullest and then the entire resultset which has been obtained is then passed on the ESQL for further processing. |
|
Back to top |
|
 |
smdavies99 |
Posted: Fri Mar 04, 2016 1:23 am Post subject: |
|
|
 Jedi Council
Joined: 10 Feb 2003 Posts: 6076 Location: Somewhere over the Rainbow this side of Never-never land.
|
There is another difference that is not always apparent at first.
Using a PASSTHRU select you can do much more than with the ESQL Select.
For example,-
1) Limit the number of rows returned
2) Do the select with out created DB table/row locks (i.e. readonly)
3) Do table joins in the select
etc
etc
etc _________________ 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 |
|
 |
|
|
 |
|
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
|
|
|
|