Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

how to improve the performance of Syncsort Db2 query?

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
jctgf
Currently Banned

Active User


Joined: 04 Nov 2006
Posts: 109

PostPosted: Thu May 06, 2010 5:09 pm    Post subject: how to improve the performance of Syncsort Db2 query?
Reply with quote

hi there,
is there a way to improve the performance of syncsort when reading db2?
i tried to increase mincore and also used a few sortwkxx areas, with no effect.
the same select under a db2/bmc utility runs faster.

this is the code i'm using:

Code:
//BSORT     EXEC PGM=SYNCSORT,PARM='DB2=Dabc'                       
//$ORTPARM DD *                                                     
 VSCORE=5M,VSCORET=40M,MINCORE=5000K                               
 OPTION MAINSIZE=40M                                               
//SYSOUT   DD SYSOUT=*                                             
//SORTOUT  DD DSN=..
//SORTDBIN DD *                                                     
       SELECT a, b, c from table where ...
//SYSIN DD *                                                       
 SORT FIELDS=COPY                                                   

i can't make any alter on the table.
thanks.
Back to top
View user's profile Send private message

dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Thu May 06, 2010 5:38 pm    Post subject:
Reply with quote

since all you are doing is a COPY function,
why not use the db2 utility?
Back to top
View user's profile Send private message
jctgf
Currently Banned

Active User


Joined: 04 Nov 2006
Posts: 109

PostPosted: Thu May 06, 2010 5:52 pm    Post subject:
Reply with quote

hi,
here, when i use a db2/bmc utility, i'm forced to put the utility in a saparate job.
they don't allow db2/bmc utilities to run in the same job/procedure the cobol program does (old habbits die hard).
it increases the number of jobs running at any time and things get unecessaryly complicated and hard to manage.
we end up having "n" jobs to do something, instead of only one.
this feature of syncsort makes things a lot easier to the developer, but i noticed there is a little loss in performance (when comparing it to the utilities).
as the tables we use here are usually very large, i was just wondering if this performance probelm could be easily tunned.
thanks.
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Thu May 06, 2010 9:42 pm    Post subject:
Reply with quote

Hello,

Quote:
is there a way to improve the performance of syncsort when reading db2
Yes, improve the performance of the query. . .

Syncsort does not "read db2". . . It merely passes along the query and services the result.
Back to top
View user's profile Send private message
dneufarth

Active User


Joined: 27 Apr 2005
Posts: 239
Location: Cincinnati OH USA

PostPosted: Fri May 07, 2010 2:56 am    Post subject:
Reply with quote

Inquiring minds -- Doesn't db2/udb attempt to do oprimizing of queries on its own?
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Fri May 07, 2010 3:27 am    Post subject:
Reply with quote

Hello,

Yes, but only within some limits.

A "good" query will quite often outperform one that was thrown together to minimize the amount of code needed or with no with little/no knowledge of the data to be worked on.
Back to top
View user's profile Send private message
Marso

REXX Moderator


Joined: 13 Mar 2006
Posts: 1224
Location: Israel

PostPosted: Fri May 07, 2010 12:57 pm    Post subject:
Reply with quote

Since you're using FIELDS=COPY, syncsort does not use sortwkxx files.

Are you using an ORDER BY in your select statement ?

And how much faster is the DB2 utility ?
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Join in SQL Query vickey_dw DB2 2 Tue Jan 17, 2017 12:15 am
This topic is locked: you cannot edit posts or make replies. MQ setup query mohitsaini Java & MQSeries 4 Sun Jan 08, 2017 1:53 am
No new posts DB2 query Using Recursion, Converting... smilewithashu2 DB2 1 Tue Jan 03, 2017 12:50 pm
No new posts Syncsort Help to group fields sudhakarraju SYNCSORT 6 Thu Dec 29, 2016 1:38 am
No new posts BC, BCR, BRC, BRCL performance steve-myers PL/I & Assembler 0 Fri Dec 23, 2016 7:44 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us