Just a reminder that those of you with SQL apps, should be taking a look at the JULY 1, 2008 what's new page: What's New July 2008 to read about the new option switch called "Optimize For SQL" found on the "Use SQL" dialog of ExplorerBrowse and HandyMarkerBrowse (soon als implemented on LocatorOverrideControl).
For a while now, I'd been noticing that under certain conditions C6 SQL apps produced more than one SELECT statement per browse query or per browse order change. In theory to change browse order to descending from ascending, one would issue the identical select statement with a DESC following the fields in the ORDER BY clause.
What I was seeing, in reality, was this:
• When the browse queue was empty, the browse produced generally one or two select statements per new query, one select statement to issue the select that filled the browse and one select to reget the currently selected record into the record buffer (to honour the new selection event).
• When the browse queue had records already in it, the browse produced generally 3 or 4 select statements per new query. One select statement to fill the browse forwards from the currently selected record; One select statement to fill the browse backward from the currently selected record; One select statement to fetch the currently selected record into the record buffer. And sometimes a fourth select was issued if the fill-forward or fill-backward phases, bumped into the end of file or beginning of file condition. This wonky behaviour is supposed to be controlled by setting the RetainRow driver flag off in the ABC classes. Even SV's documentation recommends that retain row be turned off for SQL, yet the current crop of C6's behave as if retain row is on even when it's off. That behaviour is hard coded into the ABC BrowseClass INIT method.
In earlier iterations of Clarion, I'd spent quite a lot of time getting Clarion ABC browses to "cut the chatter" to the point that a single select per browse query or per browse order change was issued. I don't know when C6 ABC classes and templates changed to wrestle away the well controlled ABC-browse situation we'd had till that point, but they did, somewhere along the way.
The "Optimize For SQL" switch on our browse templates, lets you optimize your browse so that only a single select is issued for any new browse condition such as a query change or an order change. I suggest you compare this yourself on your own SQL apps, using HNDSQLTRACE.APP to trace various browses with and without the "Optimize For SQL" switch turned on.
Cheers...
Gus Creces
The Clarion Handy Tools Page
Visit Website
The CHT Blogger
Thanks for your interest in The Clarion Handy Tools, an awesome collection of productivity enhancements for Clarion developers. These tools consist of an ever-expanding set of Clarion Templates and OOP Classes that extend or complement the normal functionality of the Clarion Application Development System from SoftVelocity.
Wednesday, July 2, 2008
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment