first consider that DB optimizations are fairly dependent from the DB type/vendor, but here's a short list:
- Fetch the "Explain plan" of the query (if your db let you do this): this is useful to understand what the DB does (using indexes, for instances) to retrieve the query results
- If your query is filtering on attributes with small cardinality, create a Bitmap Index on these to speed up retrieving of table rows
- If your query is using joins and your DB supports this, use a Join Index
- If your query is retrieving results against a portion of a table identified by a single attribute, you could use Sharding