SQLTeam.com | Weblogs | Forums

Make t-sql 2012 run faster


#1

I have been working with t-sql 2012 for awhile. I have noticed that some questions run faster than other queries. I know that this is based upon the way the queries are executed. However I am wondering if certain types of t-sql statements execute faster than others? If so, can you tell me and/or point me to a reference that will show me which t-sql statements run slower and what are the replacement t-sql statements that will make the query execute faster?


#2

I don't think there is a general rule that you can say that one type of query would run faster than another type of query. How fast or slow a query runs depends on a number of factors: the amount of data involved, ability to use indexes, how well-tuned the database is (statistics, indexes), and how the query is written in relation to how the data is structured.

If you search for query tuning, you will find lot of resources - many of which will point you to features such as execution plans which allow you to examine which parts of your query are bottlenecks.