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 » ESQL Select Statement vs Passthru Statement

Post new topic  Reply to topic
 ESQL Select Statement vs Passthru Statement « View previous topic :: View next topic » 
Author Message
WMBSAM
PostPosted: Tue Feb 16, 2016 6:21 am    Post subject: ESQL Select Statement vs Passthru Statement Reply with quote

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
View user's profile Send private message
manoj5007
PostPosted: Fri Mar 04, 2016 12:41 am    Post subject: Reply with quote

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
View user's profile Send private message
smdavies99
PostPosted: Fri Mar 04, 2016 1:23 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.

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
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » ESQL Select Statement vs Passthru Statement
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.