Adrian Hills 5/26/2010

Optimising wildcard prefixed LIKE conditions

Read Original

This 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.

Optimising wildcard prefixed LIKE conditions

Comments

No comments yet

Be the first to share your thoughts!

Browser Extension

Get instant access to AllDevBlogs from your browser

Top of the Week