On Thu, Dec 9, 2021 at 11:31 AM Greg Wilburn
<gwilburn@xxxxxxxxxxxxxxxxxxxxxxx> wrote:

What's weird is that the same query will use that index sometimes and not others.

When it uses the index, the response time is 1-3 seconds
When it doesn't, the response time is 16-24 seconds

Yeah, this is probably the main thing about query engines which made
me suspicious of them for so long, and kept me relying on hand-coded
RLA. When I was first exposed to query tools on AS/400 (at the time),
query fans assured me that the optimizer was really, really smart. Yet
I would often write queries where I had what I thought was an obvious
logical file to leverage (as an index), and yet the query still ran
dog-slow. Uh, sorry, no, I'll stick to my own SETLL/READ/CHAIN,
thankyouverymuch.

I imagine it must have felt something like that for assembly
programmers in the early days of high(ish)-level language compilers.

Today, the combination of hardware that is literally orders of
magnitude faster, plus vastly improved automated optimization, makes
me much more comfortable using SQL whenever that's convenient.

There are still a few corner cases that surprise me (not in a good
way), but sometimes even doing something "the slow way" on today's
machines is Plenty Fast Enough; and there's usually a way to speed
things up yourself if need be. Especially if you have Birgitta-level
SQE-whispering.

John Y.

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
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.