IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

how to improve the performance of Syncsort Db2 query?


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
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
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
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
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

Moderator Emeritus


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

PostPosted: Thu May 06, 2010 9:42 pm
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: 420
Location: Inside the SPEW (Southwest Ohio, USA)

PostPosted: Fri May 07, 2010 2:56 am
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

Moderator Emeritus


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

PostPosted: Fri May 07, 2010 3:27 am
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: 1353
Location: Israel

PostPosted: Fri May 07, 2010 12:57 pm
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts Compare only first records of the fil... SYNCSORT 7
No new posts RC query -Time column CA Products 3
No new posts Dynamically pass table name to a sele... DB2 2
No new posts exploiting Z16 performance PL/I & Assembler 2
No new posts Query on edit primary command CLIST & REXX 5
Search our Forums:

Back to Top