[Info-vax] Looking for some text search ideas

Hein RMS van den Heuvel heinvandenheuvel at gmail.com
Fri Sep 26 14:36:23 EDT 2014


On Friday, September 26, 2014 1:27:04 PM UTC-4, David Froble wrote:
>>Does anyone know of a more effective method 
than a sequential pass through the data of searching a list of data 
looking for text matches? 

Yes. Use 2 (or 10) passes each processing 1/2 (or 1/10) of the data. :-).

For an RMS sequential file, take 1/2 EOF. Read 8 (or so) blocks,
Start looking for a word on a word boundary which is smaller than LRL, and added to the curent offset points to a similar word. Use that as the stopper for the first stream, and use is for a $FIND-by-RFA to kick of the second stream.

Was that SQl just as a matter of example, or did you indeed want to use SQL syntax, and columns as such,

For recent OpenVMS versions you can use SEARCH/KEY=(POS=n,SIZ=n) for column style search.

Attunity's Connect product can give you that SQL option, but is does no special processing... $GET in a loop, string-matches against the column data, linear.

You'll have to determine whether it is worth an (improvement) effort.
How long does it take, and how many resources used (CPU, IO) using some KISS method. 
Next take a stab at how long it is allowed to take and how many resource are available (memory, cpu). Also, figure out how often. Is it worth your while to load up a helper structure once for reuse?

Cheers,
Hein




More information about the Info-vax mailing list