This week's book giveaway is in the Mac OS forum. We're giving away four copies of a choice of "Take Control of Upgrading to Yosemite" or "Take Control of Automating Your Mac" and have Joe Kissell on-line! See this thread for details.
Rajesh, Can you post the query? Many performance issues are in the SQL itself.
Some thoughts: 1) You should use StringBuilder or StringBuffer rather than all those string concats. This is unlikely to be your primary bottleneck, but is still good practice? 2) How many columns are in your select statement? If there are any fields you aren't using, you are transferring more data than necessary. 3) Are you required to display 2000 records on the screen in an HTML table? This seems hard to use on the screen. Can you introduce paging and display a reasonable number at a time.