• Subject: Fastest string scan -Reply
  • From: David Morris <dmorris@xxxxxxxxxxxxx>
  • Date: Wed, 17 Sep 1997 17:36:14 -0600

>>> Denis Robitaille <drobitaille@Cascades.com> 09/17 3:41 pm >>>
The string can be anywhere in the product description. Currently, I use the
SCAN opcode to do the scanning. It works great in the test environment but in
production (with a lot more products), it is way to slow. I do load the subfile 
page at a time. I think the delay is due to the SCAN opcode and I am
thinking of replacing it with the QCLSCAN API. But before going any further, I
thought I'd ask around. What do you think is the fastest way to do this?
Any help would be appreciated.
Denis Robitaille
Cascades Inc.

You might consider SQL.  It is more difficult when you need to scroll forward
and backward through the file (With a starting point specified).  This can be
overcome.  If you do not have SQL try opnqryf which is more limited but could
accomplish what you are after.  We have many SQL inquiries over fairly large
files that allow searching.  This works best with static files or where the key
can be derived from the primary file.  It can be quite flexible for searching,
allowing all descriptions with "ROLLS" and package type "BAG" etc.

Key in an SQL or OPNQRYF/CPYFRMQRY statement and check out how it
performs.  If the performance is acceptable it should be OK in your program.  If
not check the optimization parameters and run the statement in debug and
look at the optimization recommendations.  To build the statement and
display the first page of a subfile our experience has been that joining 3 or
fewer files with less than 2 million total records gives < 2 second response if 
usable key exists.  If not it can take 3-10 seconds.  Normal response for a
subfile is 1 second.

David Morris
| This is the Midrange System Mailing List!
| To submit a new message, send your mail to "MIDRANGE-L@midrange.com".
| To unsubscribe from this list send email to MAJORDOMO@midrange.com
|    and specify 'unsubscribe MIDRANGE-L' in the body of your message.
| Questions should be directed to the list owner/operator: david@midrange.com

This thread ...


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

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