Optimising wildcard prefixed LIKE conditions
Read OriginalThis article explains the performance issue with SQL queries using a wildcard at the beginning of a LIKE condition (e.g., '%Tire Tube'), which forces an index scan. It details a solution involving adding a computed column with the reversed string, indexing it, and rewriting the query to allow an index seek, significantly improving efficiency on larger tables.
Comments
No comments yet
Be the first to share your thoughts!
Browser Extension
Get instant access to AllDevBlogs from your browser