GeekInterview.com
  I am new, Sign me up!
 
GeekInterview.com  >  Interview Questions  >  Microsoft  >  ASP.NET
Go To First  |  Previous Question  |  Next Question 
 ASP.NET  |  Question 110 of 164    Print  
How do you optimize a query?
my interviewer asked me to optimize q query in 2 mins... how will you do it. He wanted to test my approach .. nothing specific to any query.


  
Total Answers and Comments: 3 Last Update: March 15, 2007     Asked by: madhuri2405 
  
 Sponsored Links

 
 Best Rated Answer

No best answer available. Please pick the good answer available or submit your answer.
February 19, 2007 18:11:38   #1  
yv_harish        

RE: How do you optimize a query?
There are two general steps to optimize a query

1. saperate the Queries which run for longer time
2. Identify the issue behind the query running for a long time

 
Is this answer useful? Yes | No
February 20, 2007 06:14:13   #2  
Pasalapudi        

RE: How do you optimize a query?
Hi

First find the slow performance query. If any correlated or sub-qurries separate them with appropriate joins.

Use Indexes for performance.

see for Sql performance articles
http://www.sql-server-performance.com/tips_performance.asp

 
Is this answer useful? Yes | No
March 15, 2007 13:23:35   #3  
A        

RE: How do you optimize a query?


Reduce the size of index

 
Is this answer useful? Yes | No


 
Go To Top


 Sponsored Links

 
About Us -  Privacy Policy -  Terms and Conditions -  Contact -  Ask Question -  Propose Category -  Site Updates 

Copyright © 2005 - 2009 GeekInterview.com. All Rights Reserved

Page copy protected against web site content infringement by Copyscape