Larry,
I can understand where Jan is coming from. Years ago when the company first started using RBASE, I had little knowledge of programming so most of our people became very acquainted with the WHERE builder. You must admit it is a very neat item in that you are only limited by the fields in the tables or views. Our people got used to using the CONTAINS feature so that is why I started with that wildcard word when using the OKP EEP form. Your explanation of how RBASE optimizes the database through Indexing and the LIKE wildcard has helped me see why my queries were so slow even though I had a Primary key. Even though we have used RBASE for about 17 years, this is the first time I started using the LIKE wildcard. Thanks for taking time to help this novice (still) programmer. Sometimes I even have the FUN that Razzak talks about. Jim ________________________________ From: [email protected] [mailto:[email protected]] On Behalf Of Lawrence Lustig Sent: Friday, February 12, 2010 3:02 PM To: RBASE-L Mailing List Subject: [RBASE-L] - Re: ON KEY PRESS << So CONTAINS always seemed to give me the results I wanted without having to play around with wildcards. >> If you need to do a CONTAINS search (because you really need to search the whole field, not just the start of the field), then there's no way to avoid it. Unfortunately, that kind of search is not optimizable without implementing some kind of full-text indexing. If you're going to do a CONTAINS search it makes sense to try to include some other optimizable criteria in the same search to limit the number of rows over which R:Base has to perform the CONTAINS. Alternatively, you can implement a LIKE 'String%' which will be quicker and then include a "Find More Matches" button underneath the results to perform the CONTAINS search. That will be slower, but the user will understand that they're asking for an extra-special search. -- Larry

