title: Usage of a date index in Oracle
body: <p>I have a query which retrieves shipment information. </p>
  
  <p>I would like to be able to use an index on a date column. The where clause for this column looks like <code>shipment.end_alloc_date &gt;= to_date( last week )</code>. 
  When I add <code>shipment.end_alloc_date &lt;= to_date( next week )</code> the index is used. However, I don't want to use this second line.</p>
  
  <p>Does anyone know how to force Oracle to use this date index with only using the first restriction?</p>
  
  <hr>
  
  <p>The table contains about 180.000 rows and both sql retrieve 50 rows. However, when I run explain plan the index on end_alloc_date is only used in the second sql. How come and is there something I can do to force Oracle to use the index?</p>
  
  <p>1) <code>select &lt;some data&gt; from shipment where shipment.end_alloc_date &gt;= to_date( last week )</code></p>
  
  <p>2) <code>select &lt;some data&gt; from shipment where shipment.end_alloc_date &gt;= to_date( last week ) and shipment.end_alloc_date &lt;= to_date( next week )</code></p>