50 methods to skillfully optimize your SQL Server database
There are many reasons for slow query speed. The following are common causes:
1. No index or no index is used (this is the most common problem of slow query and is a defect in programming)
2. Low I/O throughput, resulting in a bottleneck effect.
3. the query is not optimized because no computing column i
In order to optimize the performance of Microsoft SQL Server most effectively, you must be clear about where performance will be maximized in terms of changing circumstances and focus on these aspects. Otherwise, you may spend a lot of time and effort on these issues, while performance is not significantly improved.Most of the following information does not addre
plan during the query optimization phase, but when the query executes phase, @id=567 is used as the criteria for the query to get the result set.If the optimize for query is not applicable, Hint,sql server uses @id-567 to generate the execution plan, using @id=567 as the query criteria to get the result set. MSDN's explanation for query hint:
Optimization
SQL Server
DatabaseThere are many reasons for slow query speed, which are common in the following ways: 1. No index or no index is used (this is the most common problem of slow query and is a defect in programming) 2. Low I/O throughput, resulting in a bottleneck effect. 3. the query is not optimized because no computing column is created. 4. Insufficient memory 5. slow network speed 6. The que
On the forum, I often complained that SQL Server is too memory-consuming. Here I will give a brief introduction to memory-related tuning knowledge based on experience. First, describe the memory used by SQL Server.
The memory occupied by SQL
Optimize SQL Server 2000 settings
SQL Server has been well configured to optimize its own performance, which is much better than other relational databases on the market today. However, you still have several settings that need
SQL Server Profiler is a performance monitoring tool for MS SQL. You can use this tool to find the SQL statements to be optimized, and then use the database engine optimization advisor tool to help optimize the database.
SQL
the table to reduce the table size (sp_spaceuse)3. upgrade hardware4. Create an index based on the query conditions, optimize the index, optimize the access mode, and limit the data volume of the result set. Note that the fill factor should be appropriate (preferably the default value 0 ). The index should be as small as possible. Use a column with a small number of bytes to create an index (refer to the i
, including me, will encounter the same thing during his or her development process. I know why this happens, and I know how to overcome it.
II. Scope of reading
Note that the main focus of this series of articles is "optimizing the performance of transactional SQL Server database data access", but most optimization technologies are also applicable to other databases.
The optimization technology I will disc
statement, a statement sufficient to make your system completely unable to work! A question followed by a statement a aimless optimization? How do I find the system's problem statement? What's a priority?See the previous article: Expert Diagnostic Optimization Series------------------statement tuning kickI'll use the Expert for SQL Server tool to tell you how to index a key statement, like crossing, pl
First, describe the memory used by SQL Server. The memory occupied by SQL Server is mainly composed of three parts: Data Buffer, Procedure Cache, and SQL Server engine program. The cache occupied by
SQL Server skills: how to monitor and optimize OLAP Databases
It is very important to optimize the performance of online analysis and processing. Fortunately, some tools can help monitor and improve the operation of OLAP databases.
The Microsoft SQL
This article describes in detail how to optimize SQL Server database queries.
There are many reasons for slow query speed in SQL Server databases. The following are common causes:
1. No index or no index is used (this is the most common problem of slow query and is a defec
First, describe the memory used by SQL Server. The memory occupied by SQL Server is mainly composed of three parts: Data Buffer, Procedure Cache, and SQL Server engine program. The cache occupied by
subsequent execution does not need to be re-compiled, and the final execution10000The total number of queries is only used1Second.
2
, Check and analyze SQL Server
Execute the execution plan in the cache
Through the above introduction, we can see thatSQLThe memory used by the cache. You know.SQL ServerThe content in the execution cache is mainly a varietySQLStatement execution plan. To
the amount of data (size), the more important it is to increase I/O. 2. Vertical and horizontal partition table, reduce the size of the table (Sp_spaceuse) 3. Upgrading hardware 4, according to the query criteria, index, optimize the index, optimize access mode, limit the data volume of the result set. Note that the fill factor is appropriate (preferably using the default value of 0). The index should be a
On-Line Analytical Processing (OLAP) system is the main application of Data Warehouse system, specially designed to support complex analysis operations, focusing on decision support for decision-makers and senior managers, and can quickly and flexibly carry out complex query processing of large amount of data according to the requirements of analysts. And in an intuitive and understandable form of the query results provided to decision makers, so that they accurately grasp the business (company)
When your SQL Server database system runs slowly, you may know more or less that you can use SQL Server
Profiler (SQL event probe) tool for tracking and analysis. Yes, profiler can be used to capture messages sent to SQL
All the
There are many methods to optimize the stored procedure. The seven most commonly used methods are described below.
1. Use the set nocount on Option
When we use the SELECT statement, in addition to returning the corresponding result set, the corresponding number of affected rows will also be returned. After set nocount on is used, no additional information is returned except for the dataset, reducing network traffic.
2. Use the specified schema.
When u
, including me, will encounter the same thing during his or her development process. I know why this happens, and I know how to overcome it.
II. Scope of reading
Note that the main focus of this series of articles is "optimizing the performance of transactional SQL Server database data access", but most optimization technologies are also applicable to other databases.
The optimization technology I will disc
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.