Walter, after a DBFIND, check the value in the status array of the
CHAIN-COUNT element(4th) for zero. If so, there are no records in that chain
in the detail. I always do this to avoid an unnecessary DBGET and the
associated disk I/O.
***************************************************************
CDR Paul Edwards USNR Ret. HP 3000 Certified Consultant
Paul Edwards & Associates
1506 Estates Way Phone: (972) 242-6660
Carrollton TX 75006 Cel : (214) 384-8728
Email: [log in to unmask] Web : www.peassoc.com
***************************************************************
-----Original Message-----
From: HP-3000 Systems Discussion [mailto:[log in to unmask]] On Behalf
Of Walter J. Murray
Sent: Sunday, October 12, 2008 3:53 PM
To: [log in to unmask]
Subject: [HP3000-L] Thanks: TurboIMAGE B-Tree indices
Thanks to all who responded to my questions about TurboIMAGE B-Tree indices.
I have been investigating them further, and the feature seems to work
exactly as documented. There is a good chance I will use them in a project
I am working on currently.
The fact that partial key searches don't work on values like "@SMITH@"
doesn't bother me. I never expected that they would.
I have encountered only one performance-related surprise. As I thought
about it, I understood the reason. I was traversing a super-chain in a
detail data set that was associated with an automatic master.
Occasionally, the mode-5 DBGET would take much longer than I expected to
find the next entry. Then I realized that the master was linked to a number
of other details, and there were big "gaps" in the key values, where there
were entries in the master (and therefore in the index file) that had
non-empty chains in the other detail data sets, but no corresponding entries
in the detail data set that I was reading. IMAGE was doing a lot of work
reading in logical sequence through the index file, and looking up the
corresponding entries in the master, only to find empty chains in the detail
of interest. So it was not a flaw with IMAGE--just a design consideration
to be aware of.
Thanks again to everyone who offered advice.
Walter
Walter J. Murray
* To join/leave the list, search archives, change list settings, *
* etc., please visit http://raven.utc.edu/archives/hp3000-l.html *
* To join/leave the list, search archives, change list settings, *
* etc., please visit http://raven.utc.edu/archives/hp3000-l.html *
|