Q:

Does an index improve all kinds of queries?

Assume I have a book table defined as follows:
table book(id varchar(50), title varchar(100),type varchar(20),publisher varchar(20), price float)

Suppose an index is defined on ID. Now queries which uses the ID will be improved, like:
select * from book where id='abcd123456'

But will queries that uses other fields be improved as well? For instance, these two queries:
select * from book where title = 'algorithms'
select * from book where price > 25

A:

No, it won't. However, if there is an index on one column, and the query involves that column and others, it will work out to use the index, if it can.

