Keywords: Index use, analyzing

# Make sure indexes are being used, and rebuild them

If an index is useful for a query, Derby is probably using it. However, you need to make sure. Analyze the way Derby is executing your application's queries. See Analyzing statement execution for information on how to do this.

In addition, over time, index pages fragment. Rebuilding indexes improves performance significantly in these situations. To rebuild an index, drop it and then re-create it.

Parent topic: Always create indexes
Related concepts
Create useful indexes
Think about index order
Think about join order
Decide whether a descending index would be useful