[Progress Communities] [Progress OpenEdge ABL] Forum Post: RE: Use-index prevent multiple brackets: documented?

  • Thread starter Thread starter Rob Fitzpatrick
  • Start date Start date
Status
Not open for further replies.
R

Rob Fitzpatrick

Guest
David, thanks for bringing this up. It relates to some developer training we'll be doing internally and to a conversation I was in recently at PCA. The consensus was that there are a lot of developers who don't understand the nuances of USE-INDEX and that it isn't well documented. This isn't changed by the fact that it has always worked the same way or that there are people out there who understand it perfectly. New developers shouldn't have to spend years unknowingly writing bad code or develop the intuition that the reference docs don't tell the whole story so they have to go spelunking in the KB. > Rob, Did Progress ever clarify the unintentional and non-intuitive impact of USE-INDEX on query performance? This is what the 11.7 docs say under "Record phrase": USE-INDEX index Identifies the index you want to use while selecting records. If you do not use this option, the AVM selects an index to use based on the criteria specified with the WHERE, USING, OF, or constant options. No mention of bracketing. Clearly, this isn't the whole story on USE-INDEX. Is there some other place in the docs that explains it in more detail? I looked back through my old cases and now realize I didn't file a doc bug as I said I would. I'll do that. Thanks. > I would say this is pretty well documented already I wouldn't. :) > Multi bracketing is not a given on any query, especially complex ones. To get multi bracketing usually requires repeating fields in the query, particularly if an “or” is involved. All criteria must be in both (or all) sides of the “or”. This still doesn't mention USE-INDEX's effects on bracketing. > It should be replaced with a more explicit keyword (maybe "USE-INDEX-WITHOUT-MULTIPLE-BRACKETING"). I'd be happy with simply improving the reference docs for USE-INDEX, adding a sentence or two to say what the feature actually does. It would be a quick, cost-effective change that would help people. Without that change it's an incomplete reference.

Continue reading...
 
Status
Not open for further replies.
Back
Top