×

Good News Everybody!

The new search engine is LIVE!

Please report any problems to david (at) midrange.com.




I've never heard of user indexes, but it sounds like what I'm looking for. I found the API's for reading and writing. There was a performance warning about auto-flushing to disk, but I don't imagine that would be a problem since I’d only be writing once a day.

My final condition, "And (COLUMN4 = :local4 or :local4 = '');" would be an issue. I'm not sure what the point of that was, so I'm going to have to research it.



-----Original Message-----
From: Mark S Waterbury [mailto:mark.s.waterbury@xxxxxxxxxxxxx]
Sent: Wednesday, June 27, 2018 7:52 PM
To: rpg400-l@xxxxxxxxxxxx
Subject: Re: Faster key lookup

Justin,

Create a User Index, and read the file, and use the MI built-in instruction INSINXEN to insert index entries into that *USRIDX object, and then your look-up procedure can just use the MI built-in FNDINXEN instruction.

This should be very fast.  You can even "pin" the *USRIDX object in a memory pool, by using the SETACCST MI instruction, or using the SETOBJACC command.

Then, once a day, or as needed, just refresh the contents -- probably simplest to just delete and recreate the whole *USRIDX object.

Hope that helps,

Mark S. Waterbury


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2026 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.