Mike Yearwood
Toronto, Ontario, Canada
General information
Category:
Databases,Tables, Views, Indexing and SQL syntax
Hi Mark
There was a tip in a FoxPro Advisor magazine a while ago. It was called Not-so-obvious optimization October 2001. I write the expression from the table on the left and the variable(s) on the right. The left is used for Rushmore optimization. The right specifies tells Rushmore what to find. The tip shows that functions on the right side are applied to every record. So, its faster to evaluate the right side's expression before running the query.
>What's the difference between putting the upper() in the select and putting it into a variable first... just curious?
>
>Thank you for your other suggestion, we'll have to try that too.
>
>--------------
>
>As Hilmar pointed out, there's little you can do to speed up this kind of searching. You'll find this....
>
>lcSearch = UPPER(ALLTRIM(variable))
>SELECT * FROM sometable WHERE UPPER(somefield) = lcSearch
>
>gives better performance for the other where clause you wrote.
>
>Use Rushmore to reduce the produce a subset of records and perform the substring searches on the subset.
Previous
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only