, which avoids longer locking of the system tables.25. Avoid using cursors as much as possible, because cursors are inefficient and should be considered for overwriting if the cursor is manipulating more than 10,000 rows of data.26. Before using a cursor-based method or temporal table method, you should first look for a set-based solution to solve the problem, and the set-based approach is generally more efficient.27. As with temporary tables, cursors are not unusable. Using Fast_forward cursors
overwriting if the cursor is manipulating more than 10,000 rows of data.26. Before using a cursor-based method or temporal table method, you should first look for a set-based solution to solve the problem, and the set-based approach is generally more efficient.27. As with temporary tables, cursors are not unusable. Using Fast_forward cursors on small datasets is often preferable to other progressive processing methods, especially if you must reference several tables to obtain the required data.
data, the same query in different circumstances may produce the opposite result, how to apply well is mainly in our personal understanding and understanding, hope to see this article friends can deepen some understanding of the index and understanding , and get rid of the error of index and develop high performance application. I am not a DBA, just a common developer, the above are some of the actual work experience, experience, in view of my level i
high-performance applications.
I am not a DBA, but an ordinary developer. The above are some experiences and experiences in my practical work. In view of my very limited level, if you say something wrong or cannot understand it, I hope you can correct it to avoid misleading others. I am very grateful.
In the future, I will continue to write some practical experience on SQL Server query performance
a copy of the original table, but there is only one member table and one distributed partitioned view on each server. The location of the data is transparent to the application.11. Rebuild the index DBCC REINDEX, DBCC INDEXDEFRAG, shrink data and log DBCC SHRINKDB,DBCC shrinkfile. Sets the auto-shrink log. For large databases do not set the database autogrow, it will degrade the performance of the server. There's a lot of emphasis on T-SQL, and here'
Label: SQL Server Query optimization method The reasons for the slow query are many, the following are common 1, no index or no index (this is the most common problem of slow query, is the defect of program design)2, I/O throughput is small, forming a bottleneck effect3. No
than the number of rows of data
The statements and data used in the example are used only as demos, the actual development application is more complex than the sample data, the same query in different circumstances may produce the opposite result, how to apply well is mainly in our personal understanding and understanding, hope to see this article friends can deepen some understanding of the index and understanding , and get rid of the error of in
name to run on any member server. The system operates as if each member server has a copy of the original table, but there is only one member table and one distributed partitioned view on each server. The location of the data is transparent to the application.11. Rebuild the index DBCC REINDEX, DBCC INDEXDEFRAG, shrink data and log DBCC SHRINKDB,DBCC shrinkfile. Sets the auto-shrink log. For large databases do not set the database autogrow, it will degrade the performance of the server. There's
The MySQL table creation stage is a very important step. The quality and advantages of the table structure directly affect the subsequent management and maintenance, I will share some practical tips to summarize my accumulation of MySQL tabulation and MySQL query optimization before going to work tomorrow.
Tip 1: add time and update time for redundant data table
Http://www.cnblogs.com/dubing/archive/2011/12/09/2278090.htmlRecently the company has come to a very tiger DBA 10几 years of experience here is called Cai Teacher. Let us share the precious wealth that Cai Lao has brought to us, with the consent of our Chua. Welcome other DBAs to shoot bricks
Directory1. What is the execution plan? The execution plan is dependent on what information.2, unified SQL statement to reduce parsing overhead3. Reduce the
Directory1. What is the execution plan? The execution plan is dependent on what information.2, unified SQL statement to reduce parsing overhead3. Reduce the nesting of SQL statements4. Staging intermediate results using temporary table5. The OLTP system SQL statement must take a binding variable6. The spy problem of the bound variable of the tilted field7. Begin
Tag: Style color IO using strong SP data on problemIn recent times, has been exploring the SQL Server query performance issues, of course, also aimless search for a lot of information, but also from the online great God's articles learned a lot, here, to the great God salute. It is by the great God selfless dedication of the influence of the spirit, so, the younger brother also in return, share about the se
The MySQL table stage is a very important link, the table structure of good or bad directly affect the follow-up management and maintenance, to go to work before tomorrow to share the summary of Personal MySQL building table, MySQL query optimization accumulation of some practical tips.
Technique one, data table redundant record add time and update timeMany of t
This paper summarizes and analyzes the techniques of MySQL query optimization. Share to everyone for your reference, specific as follows:
People who are familiar with SQL statements know that if you want to operate on a task, the SQL statement can have a lot of relevant writing, but different ways of writing
ArticleDirectory
Create highly selective Indexes
Create multi-column Indexes
Avoid creating indexes for small tables
Use indexes with filter clauses
Create an index for the order-by/group-by/distinct column to shorten the response time
Use Outer Join for restrictions
Optimize Indexes
Creating useful indexes is one of the most important ways to improve query performance. Useful indexes can help reduce the disk I/O
difference between Xxx_bin and XXX is case sensitive. Here we will a.s all add binary qualification, first to lowercase, that is, to convert the temporary result set to Utf8_bin, then use B. The index can be used directly when the s is matched. In fact, the essence of the two rewriting methods is the same, the difference is that 1 is implicit conversion. In theory, 2 is faster. Summary The fields that do join are designed to be exactly the same as the type.
» Reprint Please indicate so
I. Operator Optimization
1. In Operator
SQL statements written in are easy to write and understand, which is suitable for modern software development. However, SQL statements using in always have low performance. The following differences exist between SQL statements using in and
In database principles, clustering indexes are interpreted as follows: the order of clustering indexes is the physical storage order of data, while the non-clustering indexes are interpreted as follows: the index order is irrelevant to the physical data arrangement order. Because of this, a table can have at most one clustered index.
However, this definition is too abstract. In SQL Server, indexes are described through the binary tree data structure.
In database principles, clustering indexes are interpreted as follows: the order of clustering indexes is the physical storage order of data, while the non-clustering indexes are interpreted as follows: the index order is irrelevant to the physical data arrangement order. Because of this, a table can have at most one clustered index.
However, this definition is too abstract. In SQL Server, indexes are described through the binary tree data structure
Query optimization on SQL statements.
The foreground application works on the database server, and ultimately relies on the SQL statements in the application. According to incomplete statistics, SQL statements consume about 80% of the database server's resources. Therefore,
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.