On Feb 8, 2023, at 6:52 PM, James H. H. Lampert via MIDRANGE-L <midrange-l@xxxxxxxxxxxxxxxxxx> wrote:
I just put the debugger on an SQL query, and got a couple of indexing recommendations that appear downright nonsensical:
Of course, as usual, "the names have been changed to protect the innocent."
Both of them on file FOOBAR
First suggestion, index FOOBAR on FOO, CORGE. (FOOBAR is already uniquely keyed on FOO.)
Second suggestion, index FOOBAR on BAR, CORGE. (This makes a tiny bit more sense, but only a tiny bit: there's no uniqueness constraint on BAR, but there's already a logical non-uniquely keyed on BAR and BAZ, and also one on BAZ and BAR, and there are only a few values of BAR appearing in more than one record, only one with as many as 6, and none with more than that.)
Any idea why we'd get such nonsensical suggestions?
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,
or email: MIDRANGE-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives
Please contact support@xxxxxxxxxxxxxxxxxxxx for any subscription related questions.
As an Amazon Associate we earn from qualifying purchases.
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.