|
On Mar 14, 2015, at 5:17 PM, CRPence <CRPbottle@xxxxxxxxx> wrote:comparing\running each of them step-by-step to compare\contrast.
On 14-Mar-2015 08:59 -0500, Darryl Freinkel wrote:
I have a complex SQL script that used to run in about 3 minutes and
processed through 700k records.
I made a bunch of changes and one of the changes has resulted in the
run time going out to 12 hours.
May be great value in obtaining the pre-change copy of the script and
a predicate between files is [since] missing; that omission having resulted
Quite common for such a radical change is multiple-file queries for which
<http://www.ibm.com/support/knowledgecenter/api/content/ssw_i5_54/rzajfor the queries being run. Additional indexes on the data can provide
q/queryoptimize.htm>
_Query Engine Overview_
I have all the advised indexes required by the system.
Advised indexes are those which the optimizer presumes would be useful
With System Activity (WRKSYSACT) command shows LIC tasks that are not
I am trying to monitor system usage and found the following:
- CPU utilization is constantly around 40% (2 hours)
- Disk IO across all 10 drives is 1% or less (1 hours)
On the face of it, it appears the system is idle whilst it is
processing the data.
Unlikely /idle/, more likely just not visible at the job level. The Work
be easy and more telling than much else, if indeed there were any /wait/
Looking at the job status, for status transitions [in WRKACTJOB], could
ight be of interest:
Does anyone have any advice on how to track this down.
My first pass is usually just to look at the queries to decide which
are the most likely to be difficult to optimize and\or complete, and
then run and investigate those separately. However running the script
with the query timeout option [the query governor] set and ensuring
inquiry messages are prompted, allows the optimizer to reveal prior to
each query to be run, which are presumed to take longer than a
specified limit or an option allows forcing the optimizer to reveal
the presumptions of the query costing, irrespective of any limit. See
Change Query Attributes (CHGQRYA) for the Query Time(out) Limit
(QRYTIMLMT) parameter; the value zero suggests to stop every request
and inform of the cost before a reply allows continuing. That feature
also enables similar limits, for query temporary storage requirements,
via the Query Storage Limit (QRYSTGLMT) parameter. See the following,
along with the related and parent links at the bottom of the page that
refer to what also m
<http://www.ibm.com/support/knowledgecenter/api/content/ssw_i5_54/rzajinsert a CALL to a routine that logs the current timestamp along with
q/testperfwithqrygov.htm> _Testing performance with the query
governor_
If not separating each query with the forced timeout inquiry, I might
the statements to effect logging as were included in the updated script, the
With the old script having the same pre\post processing inserted around
when a release since has had general support ended. There are also non-IBM
We are on V5r4 so no IBM support?
AFaIK individual support contracts are available to be purchased, even
output to make certain inquiries about a specific query or a batch of
Do you know how I can use the data base monitor to analyze what is
going on?
There are some /canned queries/ documented that can be run on the DBMON
some of the above will assist. Having worked on the DB2 for i, I tend to
<http://www.redbooks.ibm.com/redpapers/pdfs/redp0502.pdf> ??-???-2000
Using AS/400 Database Monitor and Visual Explain To Identify and Tune
SQL Queries
<http://www.redbooks.ibm.com/abstracts/sg246092.html> 16-Sep-2004
DB2 Universal Database for iSeries Administration: The Graphical Way
on V5R3
<http://www.redbooks.ibm.com/abstracts/sg246654.html> 26-May-2006 SQL
Performance Diagnosis on IBM DB2 Universal Database for iSeries
<http://www.redbooks.ibm.com/abstracts/tips0624.html> 08-Aug-2006 upd:
12 August 2008 Index Advisor Surfaces Maintained Temporary Indexes
(MTI) Activity on DB2 for i5/OS
<http://www.redbooks.ibm.com/abstracts/sg246598.html> 27-Sep-2006
Preparing for and Tuning the SQL Query Engine on DB2 for i5/OS
<http://www.redbooks.ibm.com/abstracts/sg247326.html> 12-Mar-2007
OnDemand SQL Performance Analysis Simplified on DB2 for i5/OS in V5R4
Why can I not see where the processing is? It's almost like there is
a wait happening?
The easy answer is "the lack of knowing [best] where to look". Hopefully
--
--
Regards, Chuck
--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing
list To post a message email: MIDRANGE-L@xxxxxxxxxxxx To subscribe,
unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx Before posting, please take
a moment to review the archives at
http://archive.midrange.com/midrange-l.
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.