|
Andrew, >Any other suggestions on a way to a 'clear' a user index. I didn't benchmark the timings, so I can't guarantee what I do is the most efficient. However, the QUSRMVUI api allows you to remove multiple entries per call (up to 4095). On the theory that most of my user indexes will have under 4096 entries, doing one remove call seems like it *should* be faster than a delete/recreate. So my service program routine for ClrUsrIdx() does a loop requesting 4095 removes per pass, and quiting when the returned number of entries actually removed is less than the number requested. For what I use them for so far, this should always be a single pass through the loop. That being said, let me reiterate that I never benchmarked it to verify. But I did want to point out you don't need to remove each entry one at a time; you can mass remove up to 4095 entries. If you benchmark it, I'd be curious in the results. (One nice thing about using a service program routine to do the "clear" is that I can easily switch it out to a delete/recreate and not affect existing programs.) Doug +--- | This is the Midrange System Mailing List! | To submit a new message, send your mail to MIDRANGE-L@midrange.com. | To subscribe to this list send email to MIDRANGE-L-SUB@midrange.com. | To unsubscribe from this list send email to MIDRANGE-L-UNSUB@midrange.com. | Questions should be directed to the list owner/operator: david@midrange.com +---
As an Amazon Associate we earn from qualifying purchases.
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.