× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



On 07/17/2010 01:47 PM, Jon Paris wrote:
I don't often disagree with Dennis but I suspect he may be wrong on this
one.

From what the OP said, the program would read each record and then run
the %scan/regex against the record. That means every record would have
to be surfaced in the program. Using SQL it will only surface those that
match the selection criteria - surely that has to be faster unless a
very high percentage of the records are hits.


Either way, some program (either SQL or the RPG program) has to read
through a billion records. While almost certainly SQL can read through
the data faster than blocked sequential RPG reads, I suspect RPG's %SCAN
is more efficient than SQL's LIKE. Overall though, I agree - SQL
probably has the edge.

If this is a one-off thing, the implementation probably doesn't matter
much. But if this is going to be done a lot, then explicitly searching
through a billion records is clearly not the way to go. Probably better
to build up some sort of index of every possible search term. (I have no
idea if SQL does this automatically for you if you have a LIKE in an index.)

Cheers! Hans

As an Amazon Associate we earn from qualifying purchases.

This thread ...


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

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.