View previous topic :: View next topic
|
Author |
Message |
jctgf Currently Banned Active User
Joined: 04 Nov 2006 Posts: 109
|
|
|
|
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 |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
since all you are doing is a COPY function,
why not use the db2 utility? |
|
Back to top |
|
|
jctgf Currently Banned Active User
Joined: 04 Nov 2006 Posts: 109
|
|
|
|
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 |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
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 |
|
|
dneufarth
Active User
Joined: 27 Apr 2005 Posts: 420 Location: Inside the SPEW (Southwest Ohio, USA)
|
|
|
|
Inquiring minds -- Doesn't db2/udb attempt to do oprimizing of queries on its own? |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
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 |
|
|
Marso
REXX Moderator
Joined: 13 Mar 2006 Posts: 1353 Location: Israel
|
|
|
|
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 |
|
|
|