× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



QAQQINI now there is something I’ve not thought of in a while.

There is a method you can set up your own and change some of the behaviors, such as firstio however in SQL can’t you set the row count to return? IIRC, but here is an optimization manual as well.


Jim Oberholtzer
Agile Technology Architects

On Sep 5, 2024, at 4:51 PM, Patrik Schindler <poc@xxxxxxxxxx> wrote:

Hello,

the last couple of days I've been skimming through the DB2 for AS/400 Database Programming PDF (SC41-5701-02), and I've learned quite some things!

First of all, I now know precisely what I mean by "SQL is slow compared to the traditional API calls": Accessing records through the Query Component and Query Optimizer add considerable delay between pressing enter on a menu for starting an application program, and the (load paged) subfile content being displayed on the screen eventually. Of course there is much less initial processing involved when using the traditional APIs. Note: I'm using a model 150 running V4R5 for hobbyist purposes.

There's also quite some information about OPNQRYF in said PDF. OPNQRYF can be hinted to desired query optimization strategies. My attention was caught by OPTIMIZE(*FIRSTIO).

I've read about the possibility that using strsql in 5250 possibly optimizes queries differently comparing to e. g. using xDBC. See here: https://stackoverflow.com/questions/15704878/why-does-my-select-query-take-so-much-longer-to-run-on-the-web-server-than-on-th — scroll down to the first answer, mentioning *FIRSTIO.

I wonder how I can use a different query optimization file for ODBC connections. As far as I'm aware, ODBC connections are handled through QZDASOINIT, but that one gets spawned dynamically for incoming connections. Now I'm lost for ideas how to not touch the default QAQQINI but enable quicker first record delivery through ODBC connections.

Maybe changing SYSLIBLE for QSYSWRK would do, pointing to a library with a custom QAQQINI?

Other ideas?

:wq! PoC

--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: MIDRANGE-L@xxxxxxxxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives
at https://archive.midrange.com/midrange-l.

Please contact support@xxxxxxxxxxxxxxxxxxxx for any subscription related questions.


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

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.