-
Contributing Member
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
-
Junior Member
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
-
Junior Member
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
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules