SQL Optimization
来源:互联网 发布:美女朗读软件 编辑:程序博客网 时间:2024/06/05 04:21
Table should have primary key
Table should have minimum of one clustered index
Table should have appropriate amount of non-clustered index
Non-clustered index should be created on columns of table based on query which is running
Following priority order should be followed when any index is created a) WHERE clause, b) JOIN clause, c) ORDER BY clause, d) SELECT clause
Do not to use Views or replace views with original source table
Triggers should not be used if possible, incorporate the logic of trigger in stored procedure
Remove any adhoc queries and use Stored Procedure instead
Check if there is atleast 30% HHD is empty – it improves the performance a bit
If possible move the logic of UDF to SP as well
Remove * from SELECT and use columns which are only necessary in code
Remove any unnecessary joins from table
If there is cursor used in query, see if there is any other way to avoid the usage of this (either by SELECT … INTO or INSERT … INTO, etc)
reference:
http://blog.sqlauthority.com/2009/01/20/sql-server-rules-for-optimizining-any-query-best-practices-for-query-optimization/
http://beginner-sql-tutorial.com/sql-query-tuning.htm
- SQL Optimization
- Transact-SQL Optimization Tips
- 10 SQL optimization
- optimization
- optimization
- Optimization
- optimization
- optimization
- Oracle SQL optimization(摘自SAP Note 766349)
- Oracle SQL optimization(摘自SAP Note 766349)
- Pro SQL Server 2005 Database Design and Optimization
- Microsoft SQL Server 2000 Performance Optimization and Tuning Handbook
- Microsoft SQL Server 2005 Optimization and Maintenance Study Guide
- SQL SERVER – Stored Procedure Optimization Tips – Best Practices
- A drop of performance testing-SQL Optimization 1
- A drop of Performance testing-SQL Optimization 2
- A drop of performance testing-SQL Optimization 3
- SQL调优与SQL优化(SQL Tuning or SQL Optimization)
- python(二)
- 一个“复杂的”SQL
- tomcat系统架构与设计模式2设计模式
- Node.js学习之IDE环境搭建
- JS回调函数的应用
- SQL Optimization
- C++ 中通过GetAdaptersInfo获取网卡配置和Ip地址信息
- 我今年二十七八岁
- android中重写onConfigurationChanged方法响应系统设置更改
- openGL学习之旅(一)DEV-C++安装GLUT
- linux操作系统实验四--打造自己的Linux发行版
- 基于云计算的POS系统云支付
- 集合框架 Map之HashMap
- 设计模式--6大原则--迪米特法则