title: Will a search of unique text data in a specific period be faster than a search through all records?
body: <p>Suppose we have the table with 10 million rows. Rows contains nvarchar field (target value) and datetime field (creation date). Target value (text) is within a day (24h). In a day we have 100k rows. It means that target value can be in this 100k rows or it may not be in the table at all. Each target value is unique (<strong>!</strong>).</p>
  <p>My thoughts:</p>
  <ol>
  <li><strong>Searching in all records</strong>.</li>
  </ol>
  <ul>
  <li>We just search through each record until the first match (expensive).</li>
  </ul>
  <ol start="2">
  <li><strong>Searching in a specific period</strong>.</li>
  </ol>
  <ul>
  <li>From all records we select only records related to a period (potentially expensive).</li>
  <li>Do the same as the point one (not expensive).</li>
  </ul>
  <p>In my mind potentially we work with all records in both cases, but I assume that SQL can work with datetime by more efficient way.</p>