>Has anyone found a way to speed up SQL Server when using the LIKE operator with a % character? When doing it from the interface, this is as it is in VFP. But, when using it from our application, where everything is parameterized, this is slow. I have been answering some requests in the past weeks in regards to that where everyone is wondering why it is so slow when searching for field that starts with something. They got used to VFP where this is instant result. What can I do to speed that up?
Are you using Sql's text indexing features on the fields you're interested in? That will significantly speed up searches.
Using named parmeters vs. hardcoded values should make no difference. Maybe the slowness is in your returning the results (ie. returning a large data set to the client code) rather than the query execution.