Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Rushmore
Message
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
Miscellaneous
Thread ID:
00655810
Message ID:
00655818
Views:
23
>Hi,
>
>Could someone tell me if the LIKE clause is rushmore optimizable?
>I have an index defined as Upper(Name), where NAme is my field.
>
>My query is:
>select * from mytable where upper(name) like "%RIA%"
>
>When i use the sys(3054,1) function, it says that the query is not optimizable.
>
>Please help.
>
>Ria

If pattern in LIKE clause starts with wildcard character '%' or '_' than query isn't optimizable. Otherwise it's optimizable.
* not optimizable
select * from mytable where upper(name) like "%RIA%"

* optimizable. VFP can use index to get records that start with 'RIA'
select * from mytable where upper(name) like "RIA%"
--sb--
Previous
Reply
Map
View

Click here to load this message in the networking platform