sybase asa - Adding index to the column already having an index -
there indexes available each columns. ex: indx1 on col1 , indx2 on col2. possible create again composite index indx3 combining col1 , col2? col1 , col2 used in condition. indx3 in effect?
yes, query optimizer best matching index. if include col1
, col2
in composite index , query (where
) 2 fields use index.
you should consider throwing away index on col1
because composite index can used queries on col1
too. depends on sequence of columns in composite index: first column can queried without second one.
Comments
Post a Comment