Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to optimize a query ?
Message
 
To
24/01/2009 12:34:53
Raza Malik
Universal Accounting Software
Edgewater, New Jersey, United States
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP2
Miscellaneous
Thread ID:
01376743
Message ID:
01376745
Views:
19
>Hello Experts...
>
>The following query takes almost 5 minutes to show results on a table containing 290K records. How can I optimatize it ?statement:
>
>
>
>SELECT itm_numb,itm_desc FROM A WHERE itm_desc LIKE '%TOOLS%'
>
>
>
>The table is indexed on both fields. The code page matches and is set to 1252 (Windows ANSI), of both the table and the envirement.
>The RUSHMORE optimizer (SYS(3054, 1) returns :none.
>
>Any idea ?
>
>Raz

LIKE command is optimizable only if you search at the beginning of the string:

LIKE 'TOOLS%'
but the way you use it it is not, no matter if you have index or not.
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform