Blue Theme Orange Theme Green Theme Red Theme
 
Home | Forums | Videos | Advertise | Certifications | Downloads | Blogs | Interviews | Jobs | Beginners | Training
 | Consulting  
Submit an Article Submit a Blog 
 Jump to
Skip Navigation Links
TechnologyExpand Technology
WebsiteExpand Website
Team Foundation Server Hosting
Search :       Advanced Search »
Home » SQL » Performance Tuning High Level- SQL SERVER

Performance Tuning High Level- SQL SERVER

You can view the query execution plan while executing the query in your query analyzer. Through that you can tune your query. It will show you whether the appropriate tables are using the proper index or not.

Author Rank :
Page Views : 2749
Downloads : 0
Rating :
 Rate it
Level : Beginner
   Print Read/Post comments Post a comment  Similar Articles  
   Email to a friend  Bookmark  Author's other articles  
 
6 Months Free & No Setup Fees ASP.NET Hosting!
Become a Sponsor
 Tag Cloud
 Latest Jobs
More ... 
 Latest Interview Questions
More ... 


HTML clipboard

Analyze Query execution plan

You can view the query execution plan while executing the query in your query analyzer. Through that you can tune your query. It will show you whether the appropriate tables are using the proper index or not. Other information like, whether you plan is using Table Scan or Index Seek or Bookmark Lookup or Hash Join and etc. Based on the above information you can tune your query easily

Tuning1.gif

  • Table Scan
  • Index Seek
  • Bookmark Lookup
  • Hash Join

Table Hints

Table Hints will make the query execution faster by forcing the plan to choose the appropriate joins or any other stuff that is mentioned as the hints. You can retrieve the top percentage of results; like that so many hints are available in sql server. Make the use of table hints appropriately.

  • KEEPIDENTITY
  • KEEPDEFAULTS
  • FASTFIRSTROW
  • • FORCESEEK
  • HOLDLOCK

Avoid Functions in Where Clause

Don't use any inbuilt function in the where clause, it will make the execution plan more complicated; it will avoid the Index Seek in the plan if you use it.

Partitioning

Partition the table whenever required, because whenever the number of row increases, query retrieval will be affected. It will take more time in the select query. To avoid that, based on the selection process just partition the table horizontally or vertically, which will make the query retrieval faster.

Apply Scale Up and Scale Out Strategies

Apply the scale up and scale out strategies whenever required. Scaling up is nothing but increasing the hardware support of the database server, which will increase the performance. Scaling out is nothing but partitioning the table horizontally or vertically. There were lot more stuff in it, it's just the introduction.

Avoid if conditions in the stored procedure

Don't use If conditions unless its required, because each and every time stored procedure will be recompiled. It won't be stored in the cache.

Update Statistics

Update the statistics in a weekly or monthly basis; it will update the index information of a table. When a lot of insert and update operation done on a table, we should update the index information, for that we need to update our statistics, which will improve the performance of a transaction.

Covering Index or Composite Index

Use Covering Index aka Composite Index to avoid the unnecessary book mark lookup in the execution plan.

LDF & MDF Location

Have the log file and data file in separate drive, which will increase the performance drastically.

Appropriate Usage of Index

Don't create Index for all the tables, sometimes it will slow down the performance too. When you create index its storing additional information internally to the database; Data's will be fetched quickly even if you don't create index for a table. So Index creation should be done according to the usage.

Resource Governor

A single server is used to provide multiple services, so allocate the server resources based on the usage of each service, like reporting services, OLTP, OLAP services. This will avoid the 100 percent CPU utilization.

Tuning2.gif

Profiler and Database Engine Tuning Advisor

Through profiler you can easily trace which query is taking more time to execute, so once selected you can tune the queries using tuning advisor tool which is already inbuilt in sql server.
 

Comment Request!
Thank you for reading this post. Please post your feedback, question, or comments about this post Here.
Login to add your contents and source code to this article
 [Top] Rate this article
 
 About the author
 
Manikavelu Velayutham
I have over 6 years of IT industry experience with Microsoft technologies. I hold Masters degree in Computer Science and Applications. I am responsible for providing solution in Service Oriented Architecture and involving in Performance Engineering activities. I am also responsible for mentoring my team members.
Looking for C# Consulting?
C# Consulting is founded in 2002 by the founders of C# Corner. Unlike a traditional consulting company, our consultants are well-known experts in .NET and many of them are MVPs, authors, and trainers. We specialize in Microsoft .NET development and utilize Agile Development and Extreme Programming practices to provide fast pace quick turnaround results. Our software development model is a mix of Agile Development, traditional SDLC, and Waterfall models.
Click here to learn more about C# Consulting.
 
Introducing MaxV - one click. infinite control. Hyper-V Hosting from MaximumASP.
Finally – a virtual platform that delivers next-generation Windows Server 2008 Hyper-V virtualization technology from a managed hosting partner you can truly depend on. Visit www.maximumasp.com/max for a FREE 30 day trial. Hurry offer ends soon. Climb aboard the MaxV platform and take advantage of High Availability, Intelligent Monitoring, Recurrent Backups, and Scalability – with no hassle or hidden fees. As a managed hosting partner focused solely on Microsoft technologies since 2000, MaximumASP is uniquely qualified to provide the superior support that our business is built on. Unparalleled expertise with Microsoft technologies lead to working directly with Microsoft as first to offer IIS 7 and SQL 2008 betas in a hosted environment; partnering in the Go Live Program for Hyper-V; and product co-launches built on WS 2008 with Hyper-V technology.
Dynamic PDF
ceTE software specializes in components for dynamic PDF generation and manipulation. The DynamicPDF™ product line allows you to dynamically generate PDF documents, merge PDF documents and new content to existing PDF documents from within your applications.
Discover the Top 5 .NET Memory Management Fundamentals
To write the best .NET code, you need to know exactly how the .NET framework really manages memory. Ricky Leeks presents the Top 5 fundamental facts of .NET memory management. Learn more.
Nevron Chart for .NET 2010.1 Now Available
The leading .NET charting control now features PDF, Flash and Silverlight export, visualization of large datasets and more. Deliver true charting functionality to your BI, Scorecard, Presentation or Scientific apps. Download evaluation now.
ASP.NET 4 Hosting
Get 2 Months Free of ASP.NET Hosting for Only $4.95/month! Receive FREE MS SQL and MySQL Databases Including ASP.NET 4/3.5, MVC 3.0, Silverlight 4, Windows 2008/IIS 7.0 Plus FREE IIS 7 Modules. Host UNLIMITED ASP.NET Web Sites – Click Here!
 
 Post a Feedback, Comment, or Question about this article
Subject:
Comment:
DevExpress Free UI Controls
Become a Sponsor
 Comments
Nevron Chart
 © 2012  contents copyright of their authors. Rest everything copyright Mindcracker. All rights reserved.