title: How and when are indexes used in INSERT and UPDATE operations?
body: <p>Consider <a href="https://docs.oracle.com/cd/B19306_01/server.102/b14231/indexes.htm" rel="nofollow noreferrer">this</a> Oracle docs about indexes, <a href="https://docs.oracle.com/cd/E17952_01/refman-5.1-en/insert-speed.html" rel="nofollow noreferrer">this</a> about speed of insert and <a href="https://stackoverflow.com/questions/31175001/oracle-11g-performance-effect-of-indexing-at-insert">this</a> question on StackOverflow lead me to conclusion that:</p>
  
  <ul>
  <li>Indexes helps us locate information faster</li>
  <li>Primary and Unique Keys are indexed automatically</li>
  <li>Inserting with indexes can cause worse performance</li>
  </ul>
  
  <p>However every time indexes are discussed there are only <code>SELECT</code> operations shown as examples.</p>
  
  <p><strong>My question is</strong>: are indexes used in <code>INSERT</code> and <code>UPDATE</code> operations? When and how?</p>
  
  <p>My suggestions are:</p>
  
  <ul>
  <li><code>UPDATE</code> can use index in <code>WHERE</code> clause (if the column in the clause has index)</li>
  <li><code>INSERT</code> can use index when uses <code>SELECT</code> (but in this case, index is from another table)</li>
  <li>or probably when checking integrity constraints </li>
  </ul>
  
  <p>but I don't have such deep knowledge of using indexes.</p>