Create useful indexes Indexes are useful when a query contains a WHERE clause. indexesguidance, creating

Without a WHERE clause, is supposed to return all the data in the table, and so a table scan is the correct (if not desirable) behavior. (More about that in .)

creates indexes on tables in the following situations:

For an index to be useful for a particular statement, one of the columns in the statement's WHERE clause must be the first column in the index's key. For a complete discussion of how indexes work and when they are useful, see and .

Indexes provide some other benefits as well:

does not support indexing on columns with data types like BLOB, CLOB, and XML.