Which Columns Should You Index at First?

When you're taking a first look at a table, make a list of the top 5 columns where you do very selective searches on, and put single-column indexes on those 5 columns. Our goal is to reduce our search space quickly. I demonstrate with the users table and a few searches against it, showing how indexes are used.

Complete and Continue  
Discussion

0 comments