Use The Index, Luke Blog - Latest News About SQL Performance

Bind Variables in SQL

The previous installment of Use The Index, Luke finalized the section on function based indexes by explaining the limitations they have.

Today's installment covers a topic that can't be stressed enough: the proper use of bind parameters in SQL.

Although the most important reason to use bind parameters is the prevention of SQL injection, bind parameters have a positive impact on performance but might affect index selection.

PS: Wanna look further down the road? I just blogged about an index related performance optimization in MySQL.
PPS: Need Help Right Now? Check out my Instant-Coaching offer.

Limits of Function Based Indexes

The previous installment of Use The Index, Luke introduced the concept of function based indexing to implement a case-insensitive search with the SQL function UPPER.

Today's installment explains the limits and "risks" of function based indexes. The section on using functions in indexes is concluded by a small exercise to check your understanding—and creativity (trap inside!).

Case-Insensitive Search

The initial installment of Use The Index, Luke explained the anatomy and explained the "slow index" phenomenon. The last step was to create an index on LAST_NAME to avoid an unreasonable INDEX RANGE SCAN if the SUBSIDIARY_ID is present but not the EMPLOYEE_ID.

Today's installment introduces function based indexes to implement case-insensitive search.

Launching Use The Index, Luke

Use The Index, Luke! is a guide to database performance for developers.

I started the book because I noticed that almost every existing book or online document on that topic is stuffed with plenty of information that is not relevant to developers.

Although a certain know-how of the database's internals is required to get the best performance, Use The Index, Luke! keeps that information at a minimum and presents it from a developer's perspective.

About the Author

Photo of Markus Winand
Markus Winand tunes developers for high SQL performance. He also published the book SQL Performance Explained and offers in-house training as well as remote coaching at