ALLInterview.com :: Home Page KalAajKal.com
 Advertise your Business Here     
Browse  |   Placement Papers  |   Company  |   Code Snippets  |   Certifications  |   Visa Questions
Post Question  |   Post Answer  |   My Panel  |   Search  |   Articles  |   Topics  |   ERRORS new
   Refer this Site  Refer This Site to Your Friends  Site Map  Bookmark this Site  Set it as your HomePage  Contact Us     Login  |  Sign Up                      
tip   To Refer this Site to Your Friends   Click Here
Google
 
Categories  >>  Software  >>  Databases  >>  SQL Server
 
 


 

 
 Oracle interview questions  Oracle Interview Questions
 SQL Server interview questions  SQL Server Interview Questions
 MS Access interview questions  MS Access Interview Questions
 MySQL interview questions  MySQL Interview Questions
 Postgre interview questions  Postgre Interview Questions
 Sybase interview questions  Sybase Interview Questions
 DB Architecture interview questions  DB Architecture Interview Questions
 DB Administration interview questions  DB Administration Interview Questions
 DB Development interview questions  DB Development Interview Questions
 SQL PLSQL interview questions  SQL PLSQL Interview Questions
 Databases AllOther interview questions  Databases AllOther Interview Questions
Question
How to tune a stored procedure?
 Question Submitted By :: Guest
I also faced this Question!!     Rank Answer Posted By  
 
  Re: How to tune a stored procedure?
Answer
# 1
stored procedure is used to write queries,if there is an 
error in the query it willnot be saved.In this if there is 
any parameters first declare it,and then the query is write.
Each stored procedure could have a name.We can create the 
stored procedure for any tables in the database.
create database->create table->stored procedure.
format:

(stored procedure name)
(@parameter1 type(size),@parameter2 type(size))


//(query)
insert into tablename values(@parameter1,@parameter2 )
 
Is This Answer Correct ?    0 Yes 2 No
Neethu Mohanan
 
  Re: How to tune a stored procedure?
Answer
# 2
There could be 'n' reasons for slow performance. For tuning 
the performance of a SP we need to know how much resources 
it is using and how much time it takes in execution. We can 
check this using the performance monitor (for example, RPC 
Counter) and execution plan. Check if we are using 
appropriate joins, table defrag, index rebuilt can be the 
solutions.
 
Is This Answer Correct ?    2 Yes 0 No
Arun Yadav
 
 
 
  Re: How to tune a stored procedure?
Answer
# 3
Store procedure is a pre compiled code
it is doing single task of several task
it is used to reduce the execution time
if we want to call store procedure just we call its name
 
Is This Answer Correct ?    0 Yes 0 No
Vimal
 
  Re: How to tune a stored procedure?
Answer
# 4
The statements from above are correct but one main thing 
that might speed a proc up is the naming convention.
If you create a user defined Storproc and you name it by 
using the "Sp_" prefix  SQL thinks is a System Store Proc 
and goes to the Master DB to look for the Object instead of 
looking locally.
 
Is This Answer Correct ?    0 Yes 0 No
Virgilio
 
  Re: How to tune a stored procedure?
Answer
# 5
Stored Procedure is Precompiled set of quries. Stored 
Procedure performence fully depended on this queries. First 
Look the queries performence using Execution Plan. After 
find the Queries, just check the Index(for table used in 
query) and look the join conditions between tables in the 
query. - This is way we need to approch to tune the SP.
 
Is This Answer Correct ?    2 Yes 0 No
Gopi A
 

 
 
 
Other SQL Server Interview Questions
 
  Question Asked @ Answers
 
which database is best to use in oracle and sql server? explain reasons? TCS5
Say if we have a table that contains only a single column , say OrderID, which has IDENTITY attribute defined on it. So how can we insert data in this table. I am reframing my question, that how can we make the table to increment the column "OrderID" value several times???  3
What are cursors? Name four types of cursors and when each one would be applied? Adea-Solutions1
What is the STUFF function and how does it differ from the REPLACE function?  2
when we use function instead of procedure? plz tell me the situation with ex?  1
how can i store resumes in database? HCL2
How to handle errors in Stored Procedures. I want to display a message to the user in the .aspx page that is calling a stored procedure in it's code behind. please help me. 247Customer1
What are the two virtual tables SQL Server maintains for triggers?  2
What is Covering Indexes? Plz explain with example  2
select the 3rd maximum salary from sql server database if 4 (just an example In practically I may not know the exact situation) of the highest salaries are equal.  7
I Have Employee table having column name as ID,SALARY how to get second max salary from employee table with id ex ID SALARY 1 20000 7 37000 2 5000  11
what are file groups? Evalueserve3
How do you know which index a table is using?  4
How the data stores in a page?  1
Which data type can be used only on OUTPUT parameters of the stored proceduer?  2
what is bit data type? and what are the information that can be stored inside a bit column?  2
what is replication? where do u use Go Keyword? Satyam1
How to select nth record from a table? DELL9
1.Describe way(s) to tune the SQL table in order to optimize performance. 2. Explain SQL Injection and how can you prevent them? Techno-Solutions1
What is Files and Filegroups in SQL Server & it's implementation. Zenith1
 
For more SQL Server Interview Questions Click Here 
 
 
 
 
 
   
Copyright Policy  |  Terms of Service  |  Help  |  Site Map 1  |  Articles  |  Site Map  |   Site Map  |  Contact Us interview questions urls   External Links 
   
Copyright © 2007  ALLInterview.com.  All Rights Reserved.

ALLInterview.com   ::  Forum9.com   ::  KalAajKal.com