title: Oracle use a hint index to a view and force it to base table
body: <p>How to  use a hint on a query against a view to force Oracle to use an index on the base table?</p>
  
  <p>E.g</p>
  
  <p>View</p>
  
  <pre><code>select emp_id 
  from v_employees 
  </code></pre>
  
  <p>base table </p>
  
  <pre><code>select emp_id /*+ INDEX(employees IDX_emp_id) */ 
  from employees
  </code></pre>
  
  <p>I want to read from the view but use the index from the base table, without changing the view query. Something like this:</p>
  
  <pre><code>select emp_id /*+ INDEX(v_employees employees IDX_emp_id) */
  from v_employees
  </code></pre>