title: Decision when to create Index on table column in database?
body: <p>I am not db guy. But I need to create tables and do CRUD operations on them. I get confused should I create the index on all columns by default
  or not? Here is my understanding which I consider while creating index.</p>
  
  <p>Index basically contains the memory location range ( starting memory location where first value is stored to end memory location where last value is
  stored). So when we insert any value in table index for column needs to be updated as it has got one more value but update of column 
  value wont have any impact on index value. <strong>Right?</strong> So bottom line is when my column is used in join between two tables we should consider
  creating index on column used in join but all other columns can be skipped because if we create index on them it will involve extra cost of
  updating index value when new value is inserted in column.<strong>Right?</strong></p>
  
  <p>Consider this scenario where table <code>mytable</code> contains two three columns i.e <code>col1</code>,<code>col2</code>,<code>col3</code>. Now we fire this query</p>
  
  <pre><code>select col1,col2 from mytable
  </code></pre>
  
  <p>Now there are two cases here. In first case we create the index on <code>col1</code> and <code>col2</code>. In second case we don't create any index.** As per my understanding
  case 1 will be faster than case2 because in case 1 we oracle can quickly find column memory location. So here I have not used any join columns but
  still index is helping here. So should I consider creating index here or not?**</p>
  
  <p>What if in the same scenario above if we fire</p>
  
  <pre><code>select * from mytable
  </code></pre>
  
  <p>instead of</p>
  
  <pre><code>select col1,col2 from mytable
  </code></pre>
  
  <p><strong>Will index help here?</strong></p>