Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SQL LIKE and Rushmore optimization
Message
From
20/01/2006 16:11:16
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
 
 
To
20/01/2006 06:05:25
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP2
Network:
Windows XP
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01088808
Message ID:
01089047
Views:
20
>Hi,
>I need help to rushmore optimize query using LIKE... or maybe change sql expression code
>Example of query
>UPPER(Description) like "%HP%PRINTER" or UPPER(Description2) like "%HP%PRINTER" or UPPER(Manufacture) like "%HP%PRINTER" or UPPER(productgroup) like %HP%PRINTER"
>
>Finally.. I'v got SYS(3054) - partial.. only Deleted tag using for rushmore optimization...
>
>Any ideas how to optimize this query, or maybe another way to get same result

OK, here's a SWAG...
select nkey, upper(Description+Description2+Manufacture+productgroup) as cBig;
   from yourtable into cursor tmp

select from yourtable where nkey in (select nkey from tmp ;
   where cBig like "%HP%PRINTER"
I.e. pull the key and your description fields into a cursor, then do the LIKE search in that cursor. May be faster, I wouldn't know. I really don't have such a big table to try with.

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform