Originally Posted by
jpsaccount
I second Mohit123, the optimizer algorithm would find it easier to use an index on the table to find +1 because they are much lesser in number and probably distributed throughout the table and would not use an index if its -1 because its easier to pick the whole thing into memory and find what is required instead of index scan and iterations.
If you really want to test out the optimizer working, you should make this a much bigger table in a test environment with similar distribution of data. It is then likely to use an index in both cases.