Chuck,
Must have overlooked that API in the doc that I read.
Just tried it and it works great. In the RPGLE that runs the 300 embedded SQL statements I just need to execute the override_qaqqini SP twice before the and then once afterward. E.g.
call qsys2/override_qaqqini(1, '', '') /* creates a qaqqini in qtemp */
call qsys2/override_qaqqini(2, 'REOPTIMIZE_ACCESS_PLAN', '*ONLY_REQUIRED') /* Updates the required option in qtemp/qaqqini */
Loop to execute 300 statements
call qsys2/override_qaqqini(3 , '', '') /* deletes qaqqini in qtemp */
Much appreciated.
Peter
-----Original Message-----
From: midrange-l-bounces@xxxxxxxxxxxx [mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of CRPence
Sent: Friday, 7 June 2013 5:52 a.m.
To: midrange-l@xxxxxxxxxxxx
Subject: Re: Performance question and SQL SERVER - RESOLVED
On 05 Jun 2013 12:53, Peter Connell wrote:
<<SNIP>> But if the application is to be executed via an Apache thread
then I must either run CHGQRYA immediately before and after execution
or execute it via a request to a corresponding persistent background
job. CHGQRYA before and after would be the simplest solution assuming
that the options definitely revert back afterward.
<<SNIP>>
You may want to investigate the QAQQINI override stored procedure to embed the option overrides within the application itself:
http://pic.dhe.ibm.com/infocenter/iseries/v7r1m0/topic/rzajq/qryoptf.htm
_i QAQQINI file override support i_
"If you find working with the QAQQINI query options file cumbersome, consider using the qsys2.override_qaqqini() procedure. Instead of creating, managing, and using a QAQQINI *FILE object directly, this procedure can be called to work with a temporary version of the INI file. It uses user-specified options and values. The support relies upon the QTEMP library, so any changes affect only the job which calls the procedure.
...
Example Usage
..."
I can not comment on used that SP, as compared with using the CHGQRYA to specify a QRYOPTLIB, because I have never used the OVERRIDE_QAQQINI procedure.
--
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.
#####################################################################################
This correspondence is for the named person's use only. It may contain confidential
or legally privileged information, or both. No confidentiality or privilege is waived
or lost by any mistransmission. If you receive this correspondence in error, please
immediately delete it from your system and notify the sender. You must not disclose,
copy or rely on any part of this correspondence if you are not the intended recipient.
Any views expressed in this message are those of the individual sender, except where
the sender expressly, and with authority, states them to be the views of Veda.
If you need assistance, please contact Veda on either :-
Australia 1300-762-207 or New Zealand +64 9 367 6200
As an Amazon Associate we earn from qualifying purchases.