<<
Okay, I've learned a few new things from Larry and they will help me get rid of 
a bunch of unnecessary indexes at this client.  I'm trusting that what he says 
is right because I didn't see much about multi-column indexes in the 
"explaining indexes" pdf file.
>>

I don't know a single SQL based system that does not work the way I described.  
I'm pretty sure that I read descriptions of the R:Base indexing system when 
they introduced compound indexes that also stated they work as expected.  
Nonetheless it wouldn't hurt to test each query as you remove redundant indexes 
to make sure.

<<
One more question.   There's a few tables with multi-column UNIQUE indexes 
(rather than a concatenated computed column).   I'm assuming that these are 
used only for enforcing uniqueness, and not used for actual indexing right?   
Because the tables also have separate single-column indexes on the columns and 
I'm wondering if they are redundent.
>>

The single-column index on the leading column of the UNIQUE index is, as you 
suspect, redundant.  UNIQUE indexes are regular indexes plus an instruction to 
the engine to not accept rows that would cause duplicate entries in the index.

--
Larry

Reply via email to