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
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.