title: CREATING INDEX SQL Server 2008
body: <p>Recently I was put into database fine tuning. I have some ideas about SQL Server and decided to create some index. </p>
  
  <p>Referred this <a href="http://sqlserverplanet.com/ddl/create-index" rel="noreferrer">http://sqlserverplanet.com/ddl/create-index</a></p>
  
  <p>But i don't understand how other types of Index like <code>INCLUDE</code>, <code>WITH</code> options will help. I tried google to but failed to see a simple description when to use those.</p>
  
  <pre><code>CREATE NONCLUSTERED INDEX IX_NC_PresidentNumber
  ON dbo.Presidents (PresidentNumber)
  INCLUDE (President,YearsInOffice,RatingPoints)
  WHERE ElectoralVotes IS NOT NULL
  
  CREATE NONCLUSTERED INDEX IX_NC_PresidentNumber
  ON dbo.Presidents (PresidentNumber)
  WITH ( DATA_COMPRESSION = ROW )
  
  CREATE NONCLUSTERED INDEX IX_NC_PresidentNumber
  ON dbo.Presidents (PresidentNumber)
  WITH ( DATA_COMPRESSION = PAGE )
  </code></pre>
  
  <p>What scenario I should use the above? Will they increase performance?</p>