SQL
In my case asked Mar 15 '12 at 07:30 inkkaa Markus Winand ♦♦ |
This is absolutely expected. Using the PK as access predicates narrows the search already down to a single row. Applying the filter predicates to that single row is hardly going to be a performance issue. Using an index for the OR expression is tricky, however. You might define it like that:
However, using the range condition Using two indexes, on the other hand, is also trouble some, because it would mean to access two indexes, and merge the result (see: Index Merge). The primary key does not have these issues, because it is used in an unconditional part of the answered Mar 19 '12 at 08:19 Markus Winand ♦♦ |