[progress Communities] [progress Openedge Abl] Forum Post: Re: How To Search *word* In A...

  • Thread starter Simon L. Prinsloo
  • Start date
Status
Not open for further replies.
S

Simon L. Prinsloo

Guest
You can use MATCHES, but it will always do a table scan. If I hand you a telephone book and ask you for the numbers of people that have surnames starting with "Will" or "Bill", you will most likely do an instinctive binary search for two ranges, from Bill to just before Bilm and from Will to just before Wilm. You will not only easily locate the page(s) that you need, you can actually take a pen and draw a line above the first and under the last applicable entries. You will easily bracket two sections of the book, (From Bill to just before Bilm and from Will to just before Wilm), although the brackets may be empty if nobody match the criteria. On the other hand, if I ask you to find my the telephone numbers of every body with "ill" in the surname, how would you approach it? Sure it is indexed alphabetically on the surname, but how to you find the page to look in? You can't bracket your search, you have to read all the surnames. If there are no matches, you will not be able to know it until you've read all of them. With the b-tree the db engine van locate "Bill* | Will*" even faster than you and me, but it has the same problem with "*ill*" in the index as as we have in the telephone book.

Continue reading...
 
Status
Not open for further replies.
Top