Click here to Skip to main content
15,920,438 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi
I had faced an interview in which A question has been asked that
As all know that Indexing is used for increaseing performance of sql queries What happens in the datadase when we create indexes ?

2-How do we make a stored procedure fast without changing the code written in procedure?
Posted

 
Share this answer
 
You can find out how indexing works here:
http://en.wikipedia.org/wiki/Database_index[^].

I cannot understand the second question. Do you mean that a stored procedure works slowly; how to improve the situation not changing its code?

First most obvious idea is actually using already written stored procedures good for some purpose, as it's always possible to do the same job without using them.

See also these tips: http://geekswithblogs.net/CatherineRussell/archive/2010/06/25/5-stored-procedures-optimization-tips.aspx[^].

Tip #1 is the variant of my advice above, tips #2 and #4 are also not related to changing their code.

See also:
http://www.sql-server-performance.com/2003/optimizing-sp-recompiles/[^],
http://sqlserverplanet.com/sql-optimization/how-to-optimize-a-stored-procedure-using-the-execution-plan[^].

Try to find some more: http://bit.ly/wbdG2i[^].

—SA
 
Share this answer
 
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900