0

I am going to develop some business logic. During requirement phase, I need to provide SLA. Business always want everything in less than second. Some time it is very frustatung also.They are not bothered about complexity. My DB is SQL server 2012 and transaction DB.

Is there any formula which will take number of tables, columns etc and provide estimate?

  • Without tests I highly doubt this is possible. Too many factors. Also keep in mind that development/local environment will behave different than full-loaded production system. – Lukasz Szozda Oct 26 '15 at 21:34
  • In a word NO. The number of tables has no bearing on the performance of a query. Neither does the number of columns. This topic of trying to explain performance of queries is massive to say the least. There is no magic formula that a query will take x amount of time. – Sean Lange Oct 26 '15 at 21:34

1 Answers1

1

No, you won't be able to get an execution time. Not only do the # of tables/joins factor in, but how much data is returned, network speed, load on the server, and many other factors. What you can get is a Query plan. SQL Server generates a query plan for every query it executes. And the execution plan will give you a "cost" value that you can use as a VERY general guideline about the query's performance. Check out these two links for more information...

1) this is a good StackOverflow question/answer.

2) sys.dm_exec_query_plan

Community
  • 1
  • 1
DeadZone
  • 1,633
  • 1
  • 17
  • 32