I'm working on improving the performance of an existing query. A criteria for one of the fields is Like "*". Is this necessary to include? Is there a difference between this and not having any criteria at all?
Thanks!
I'm working on improving the performance of an existing query. A criteria for one of the fields is Like "*". Is this necessary to include? Is there a difference between this and not having any criteria at all?
Thanks!
The wildcard will allow return of all records if the parameter is not provided.
See if this helps explain use of LIKE operator and wildcard http://datapigtechnologies.com/flash...earchform.html
How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.
That makes sense - but if I'm not sorting by that particular field at all (i.e. I ALWAYS want every record returned), is that field useful, or is it just an extra calculation that the query has to perform?
I guess the question is - if I don't include Like "*", will I leave out some records?
Do you mean the criteria is just: Like "*", not: Like [input criteria here] & "*" ?
If the former then remove it, it accomplishes nothing.
How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.
You could always put it back. But removing should not be an issue. It doesn't hurt being there, just doesn't do anything except maybe add a tiny bit of overhead to the query execution.
How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.