|
http://publib.boulder.ibm.com/infocenter/systems/scope/i5os/topic/rzajq/cqa.htm?tocNode=%74%6f%63%3a%72%7a%61%68%67%2f%69%35%6f%73%2f%34%2f%35%2f%35%2f%31%32%2f&searchQuery=%71%61%71%71%69%6e%69&searchRank=%31&pageDepth=%34
Rob Berendt
--
Group Dekko Services, LLC
Dept 01.073
Dock 108
6928N 400E
Kendallville, IN 46755
http://www.dekko.com
From:
"tim" <tim2006@xxxxxxxxxxx>
To:
"'RPG programming on the IBM i / System i'" <rpg400-l@xxxxxxxxxxxx>
Date:
03/02/2009 07:02 PM
Subject:
RE: rpg sql timeout question
Sent by:
rpg400-l-bounces@xxxxxxxxxxxx
Tom,
Its possible that a query such as "select * from customer where custname
like %a_b%" is possible. The file has close to 1 million records. I was
wondering if I could put a time limit on the execution of the query. So,
say
after 30 seconds the query stops querying and returns a time allotted has
expired or something like that.
I am using service calls to my iseries. These jobs are running in batch.
-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx]
On Behalf Of Armbruster, Tom
Sent: Monday, March 02, 2009 5:45 PM
To: RPG programming on the IBM i / System i
Subject: RE: rpg sql timeout question
Good question, but a dangerous one at the same time. For what reason
would you want to time out a request to the database? There are only a
few reasons that SQL requests would time out:
1) CPU utilization is too high.
2) The query is written for updates on locked records.
3) The query is processing a large amount of data without the necessary
resources.
4) The query is not optimized.
Before concerning yourself with timeouts in native RPG, you may want to
ensure that you have optimized the data access methods. Running SQL
interactively can be a slow process if the files and the query
statements are not optimized. If the queries do not need to run
interactively, consider pushing them to a batch process. If interactive
is required, optimize the queries as much as possible.
What is the situation you are referring to for which you want to
consider time outs?
Tom Armbruster
-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx
[mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of tim
Sent: Monday, March 02, 2009 11:57 AM
To: 'RPG programming on the IBM i / System i'
Subject: rpg sql timeout question
Is there a way to have a possibly long running sql performed in an
SQLRPGLE
program, to time out after running for a certain amount of time?
--
This is the RPG programming on the IBM i / System i (RPG400-L) mailing
list
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-l.
--
This is the RPG programming on the IBM i / System i (RPG400-L) mailing
list
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-l.
--
This is the RPG programming on the IBM i / System i (RPG400-L) mailing
list
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-l.
--
This is the RPG programming on the IBM i / System i (RPG400-L) mailing list
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-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.