Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
A database challenge
Message
From
03/03/2008 20:44:15
John Ryan
Captain-Cooker Appreciation Society
Taumata Whakatangi ..., New Zealand
 
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
01295541
Message ID:
01298314
Views:
25
Naomi,

Is LIKE %Something% optimizable???

That's the question I alluded to in another post. ;-) If you *do* have to search for a substring, there's no superior alternative to the supplied SQL AFAIK. The sample given by KG *has* searched for the substring since the very start and it's a reasonable need, though ideally you'd have some other optimizing constraint apart from State to reduce the potential million-row cohort. ;-)

As per my other post: change the LIKE to = or strike the % prefixes and then compare.
"... They ne'er cared for us
yet: suffer us to famish, and their store-houses
crammed with grain; make edicts for usury, to
support usurers; repeal daily any wholesome act
established against the rich, and provide more
piercing statutes daily, to chain up and restrain
the poor. If the wars eat us not up, they will; and
there's all the love they bear us.
"
-- Shakespeare: Coriolanus, Act 1, scene 1
Previous
Reply
Map
View

Click here to load this message in the networking platform