July 17, 2008 at 6:41 am
Hi,
I would like to know some tips with examples that i can optimize the query written by programmer?
Regards,
Sunil Kumar
July 17, 2008 at 6:46 am
There a lot of different things you can do to optimise a query, fromm removing cursors , correct indexing and reducing the number of columns selected.
Post up a copy of the query for some specific help..
July 17, 2008 at 11:07 am
You should start looking at the execution plans (from SSMS Query>Display Estimated Execution Plan - or - CONTROL L) and the DISK IO (SET STATISTICS IO ON / OFF). Additionally, review the book / article written by Grant Fitchey which is either linked to or up on this site for some great insight which will take you farther.
David
@SQLTentmaker“He is no fool who gives what he cannot keep to gain that which he cannot lose” - Jim Elliot
July 17, 2008 at 11:49 am
Lot of info about Query Tunings etc..
Avoid too many joins
Your Query optimization in overall is dependant on your Database design.
Index play a IMP part.
Get Covering indexes, on mostly used columns
Avoid indexes on TEXT/CHAR columns
Reconfigure/rework your Quries depending upon the execution plans.
Even Statistics will play a IMP part..or you see your optimized Query takes a long time to produre results.
UPDATE them regularly.
http://blogs.msdn.com/sqlqueryprocessing/default.aspx
http://www.mssqltips.com/category.asp?catid=37
Maninder
www.dbanation.com
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply