What happens when I create an index on a column?
<p>I asked multiple question about indexes already. Something like this:</p>

<p>Would following queries benefit from this index? <code>mytable(col1, col2, col3)</code></p>

<pre><code>. . . WHERE col1 = ? AND col3 = ?
. . . WHERE col2 = ?
. . . WHERE col1 IN (?, ?)
. . . WHERE col3 = ? AND col1 NOT IN (?, ?)
. . . WHERE col1 = ? OR col2 = ?
. . . WHERE col2 = ? AND col1 = ?
. . . WHERE col1 = ? AND col2 &gt; ?
. . . WHERE col1 = ? AND col3 &gt; ?

-- each question was containing one of these queries ;-)
</code></pre>

<p>Every time I got an answer for that specific query which was mentioned in that question, and still I cannot judge such a index would be useful for such a query or not. <em>(or how making it more optimal)</em></p>

<p>So I decided to ask this question and want to know about the backstage. What happens when I create an index on a column? An index is made of what? An multiple column index is containing what rows <em>(because order is important)</em>? How it works which causes a query much faster?</p>

<p>Actually I need some information about indexes to make me able how can I determine a proper index <em>(multiple columns or single column)</em> for a query.</p>

<p><strong>Note:</strong> I have some experiences to work with <code>EXPLAIN</code>. And yes I know using <code>EXPLAIN</code> is really useful in these cases. Now I just need some further information.</p>