Geeks Talk

Prepare for your Next Interview


Welcome to the Geeks Talk forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact contact us.

Ways to Achieve Query Optimization

This is a discussion on Ways to Achieve Query Optimization within the SQL forums, part of the Databases category; Hi, Some of the techniques for achieving optimization query are normalization, ER diagram. Can someone let me know some more techniques to achieve query optimization and also let me know ...

Go Back   Geeks Talk > Databases > SQL
Register Blogs FAQ Tag Cloud Calendar Mark Forums Read
  #1 (permalink)  
Old 06-22-2006
Contributing Member
 
Join Date: May 2006
Posts: 73
Thanks: 0
Thanked 6 Times in 6 Posts
joel is on a distinguished road
Ways to Achieve Query Optimization

Hi,
Some of the techniques for achieving optimization query are normalization, ER diagram. Can someone let me know some more techniques to achieve query optimization and also let me know the scenario or when to use the same.

Regards,
Joel
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 02-07-2007
Junior Member
 
Join Date: Dec 2006
Location: India
Posts: 3
Thanks: 0
Thanked 1 Time in 1 Post
reach_sks is on a distinguished road
Re: Ways to Achieve Query Optimization

Hi,
some of the point for query optimization are :-
1. Don't use trigger on Table.
2.Minimize using Index on ur table.

Thanks
Santosh
Reply With Quote
  #3 (permalink)  
Old 02-07-2007
Junior Member
 
Join Date: Dec 2006
Location: India
Posts: 3
Thanks: 0
Thanked 1 Time in 1 Post
reach_sks is on a distinguished road
Re: Ways to Achieve Query Optimization

Hi,
Go through the following point for Query Optimizations :-
1. Use views and stored procedures instead of heavy-duty queries.
2. Try to use constraints instead of triggers, whenever possible.
3. Use table variables instead of temporary tables.
4.Try to use UNION ALL statement instead of UNION, whenever possible.
5. Try to avoid using the DISTINCT clause, whenever possible.
6. Try to avoid using SQL Server cursors, whenever possible.
7. Try to avoid the HAVING clause, whenever possible.
8. Try to restrict the queries result set by using the WHERE clause.
9.Use the select statements with TOP keyword or the SET ROWCOUNT statement, if you need to return only the first n rows.
10.Try to restrict the queries result set by returning only the particular columns .


Thanks & Regard's
Santosh Kumar
Reply With Quote
The Following User Says Thank You to reach_sks For This Useful Post:
Reply

  Geeks Talk > Databases > SQL

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On
Trackbacks are On
Pingbacks are On
Refbacks are Off



All times are GMT -4. The time now is 02:49 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.3.1
Copyright © 2009 GeekInterview.com. All Rights Reserved