Among the various ways to tune the performance of a query are:
There is no one way to write a query. If you find that a query with an OUTER JOIN is taking a long time, rewrite it using an INNER JOIN. Or perhaps the WHERE clause is written in such a way that it is causing excessive database read operations.
- Normalizing or de-normalizing tables
While normalizing tables results in ideal database design, it often leads to poor querying. If you find that frequently-used queries have to span too many normalized tables, consider some duplication of data.
Lack of well-defined indexes is a frequent cause of queries taking a long time to execute. Creating indexes will cause a query to lookup the index rather than the table.
- Removing indexes.
In some cases, it is a poorly defined index that is the cause of slow query execution. For example, an index which does not include the frequently looked up columns in a table. In such a case, it is better to drop the index and recreate it.
Start with activating Query Execution Time in your stored procedure to see what takes time
SET STATISTICS TIME ON
Select * from ......
You could also view graphical execution plan of your query by:
Click Query > Include Actual Execution Plan.
You can read more about Query performance tuning on: Pinal Dave's Blog, he is the best when it comes to this.