On Fri, Jan 19, 2007 at 18:20:47 -0500,
  Jeremy Haile <[EMAIL PROTECTED]> wrote:
> That's interesting.  So if you have a composite index on two columns, is
> there much of a reason (usually) to create single indexes on each of the
> two columns?  I guess the single indexes might be slightly faster
> depending on the number of different values/combinations, so probably
> "it depends" eh?  

You are normal going to want an index on just the second column in the
index or you do things where you are selecting a small subset of rows
based on the value of that column.

In some situations it may even make sense to have a separate index on just
the first column, because it will be more compact which will speed up
searches. However, you have to pay for maintaining the extra index when
changing the data so it often isn't worth it.

---------------------------(end of broadcast)---------------------------
TIP 2: Don't 'kill -9' the postmaster

Reply via email to