Re: Which H-specs CTL-OPT do you use?
Patrik Schindler <[email protected]>
| Newsgroups | gmane.comp.lang.as400.rpg |
|---|---|
| Message-ID | <[email protected]> |
Hello Daniel, Am 11.08.2025 um 10:53 schrieb Daniel Gross <[email protected]>: > If an interactive SQL driven application starts so much slower than a RLA driven application, something is wrong with the application design - not with SQL. Dunno. To me it seems logical. Note: My example for comparison purposes is an application loading a load-all subfile with the same amount of records directly at application start time. > Yes there is a small overhead with SQL - but even on a 170 it shouldn't be so much. It's a 150 which is probably even slower. I have no personal experience with a 170. :-) > Maybe there is no usable Index, because the predicates and the order by don't match Nope, took care of that. > - maybe the SQL design is bad - like looping through an cursor and having additional SQL inside the loop to get more data (instead of getting everything together in one query) Nope. Simple query to replace a likewise simple "copy records to SFL" RLA logic. > If you like, just send me an example of an interactive SQL application that you think, is too slow - I can look at it, and see, where the problems might be. Thanks for the kind offer. I have no more source at hand to prove my allegation. But for having greater flexibility on faster machines, I have planned to expand my subfile templates with alternate versions of load-paged and load-all utilizing SQL. > Of course I understand, that you're a hobbyist - that's absolutely fine with me. But you should point that definitely out, if you give hints about CTL-OPTs or something like that, because it matters. You're completely right. Sorry, I missed that part. > And from my PoV - you should ALWAYS do things right - have a standard /COPY for CTL-OPTs and one for SQL options, use service programs for "business logic", use row-set-based SQL, and so on ... As said, my applications are probably much smaller than what professionals create(d). I think, as always, it's best to find a sweet spot between trade-offs. If I occupy myself with a lot of indirections to "do it right", experiencing overall success (in terms of "hey, it works as intended") is delayed. This might lead to me losing patience and motivation. As a hobbyist, the way of doing things is often very different compared to how a professional would do it. > Not because if gives you an immediate advantage, but because you never know, what will rise from that in the future, and because your thinking will be formed - or like some much smarter guys than we wrote: Care about your craft! Well, from my PoV, I have a relatively clear picture about what will rise from that in the future. :-) But overall I agree. > Having said that, I recommend that you get a copy of The Pragmatic Programmer (if you haven't read it already) - IMHO it's one of the best books about our craft (programming) and it teaches your to form "good habits" and get a better programmer - completely agnostic of the language you use - these tips are somehow universal truths of our trade. Thanks for the hint! :wq! PoC -- This is the RPG programming on IBM i (RPG400-L) mailing list To post a message email: [email protected] To subscribe, unsubscribe, or change list options, visit: https://lists.midrange.com/mailman/listinfo/rpg400-l or email: RPG400-L-request-+hD5IHI5Xscn3HwCXmMcX9BPR1lH4CV8@public.gmane.org Before posting, please take a moment to review the archives at https://archive.midrange.com/rpg400-l. Please contact support-FMtJrHiV//lnDLsaKlm4mFaTQe2KTcn/@public.gmane.org for any subscription related questions.