title: Indexing a Denormalized Table on Perfectly Correlated Int and VarChar
body: <p>I am using a denormalized table that collects approximately 35,000 rows per day.</p>
  <p>The data are denormalized in an automated fashion out of our production database. One of the major motivations for denormalizing the data is that the C# -based UI utilizes many complex, non persistent calculations that, for quality assurance, we didn't want to recreate through views.</p>
  <p>At the moment, we don't have any indexes on this table, but are exploring adding them. I'm a statistician by trade and am still trying to wrap my head around all of the indexing nuances. The big question I have is about the consequences of indexing both an INT and a VARCHAR that are perfectly correlated.</p>
  <p>That is, the two fields, InstrumentId (INT) and InstrumentName (VarChar(50)) are recorded from the same normalized table. We included both in the denormalized data so that we could display the name without a join but also query on the INT. (The database  has about 200 unique instruments)</p>
  <p>Even though we included the INT for the purposes of querying, sometimes we are lazy and like to query on the VarChar because it is easier to validate the condition.</p>
  <p>As we start adding indexes, I'm curious what the impact would be of indexing both the INT and VARCHAR as separate, non-clustered indexes. Considerations include speed, storage, fragmentation, etc.</p>
  <p>Is adding both as indexes a reasonable approach, or is it something that could create headaches down the road? References to reading material that discuss these issues are appreciated.</p>
  <p>I've looked at <a href="https://stackoverflow.com/questions/2021968/better-for-sql-query-performance-to-use-an-actual-denormalized-table-with-indexe">this question</a>, which discusses the option of choosing one or the other, but I'm struggling to find references about using both.</p>