I\'ve got an old web application with a lot of legacy code and I need to improve performance for some reports. I want to avoid reports rewrite, because it\'s standard legacy app
It's a good idea to improve application performance by improving SQL queries performance if DB is a bottleneck. From information provided above I can say that in your case DB performance is important and worth to improve.
It's possible to significantly improve performance of reports which execute a lot of queries by adding indexes. Especially if tables itself contain tons of records (10 000 and more). But, indexes have their own drawbacks:
For a poor performing database, inappropriate/missing indexes can be ONE of the many reasons.
If you think not having enough indexes is what causing the poor performance then there are tool to check if the missing indexes is the actual problem, but sometimes problem can be the query itself.
If your query is written poorly no matter how many indexes you add it will perform poor.
Sometimes query is written fine and there are enough indexes to support the query but there isn’t enough resources (Memory RAM, processor horse power) to get the job done quickly.
I would suggest you to investigate your database a bit more before you start adding indexes and introduce more problems which never existed before.
Some useful links
Are you using SQL's Missing Index DMVs?
This will allow you to see if there are any missing indexes and queries may gain performance by adding indexes.
Wait statistics, or please tell me where it hurts
This blog written by Paul Randal will help you to see exactly what is causing slow performance in your sql server. Whether it be your hardware or indexes or queries.
Most Expensive Queries
This will allow you to see the most expensive queries in your database, I would go query by query and try to improve the code (if possible) and also check if any index can help the query to reduce its cost.
Import Note
Performance tunning in sql server is no simple task and there is no silver bullet for it either, you will need to investigate more to find the actual bottlenecks in your database and target them, and with each change do a comparison that how that change has impacted your database performance. Good luck with that :)