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: 6968
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: 247
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: 1232
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 CONTIG for performance? JPVRoff JCL & VSAM 7 Fri Jun 09, 2017 8:39 am
No new posts Need DB2 query to fetch previous row ! Chandan1993 DB2 10 Sat Jun 03, 2017 10:43 am
No new posts JCL to Set Return code based on DB2 S... vinu78 DB2 17 Mon Mar 13, 2017 9:47 pm
No new posts SQL query not working in Cobol program. CuriousMainframer COBOL Programming 14 Wed Feb 22, 2017 5:56 pm
No new posts Omegamon for DB2 query ashek15 DB2 0 Wed Feb 15, 2017 11:25 am


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