There's 2 ways to attack this:
1. Find a way to process less data.
2. Find a way to process the data more efficiently.
Use one or both of the above.
In the case of database-related performance problems, one of the first things to do is determine how much of the overhead is in the webserver and how much is in the database. A lot of times, optimizing the database operations can result in big gains. For that, it's good to be friends with the DBA. Also to learn how EXPLAIN works.
Sometimes you can get a big
boost by moving expensive processing from the appserver to the database server. I'm not a big fan of stored procedures for trivial purposes, but sometimes just doing the "heavy" lifting in the DB server can reap big dividends. Of course, that can cause the DBA to Have Words with you, so you may have to justify the business need.
Of course, the real irony in performance improvement these days is that a lot of companies would rather have you spend time manually figuring out what's wrong instead of budgeting up for some good measurement software. After all, your time is "free"
and this is one area where the free solutions are fairly thin.
Don't forget that
Java doesn't run in a vacuum, either. Check OS-level performance as well. A badly-tuned OS can be just as much grief as a badly-tuned appserver or badly-tuned database.