Discover sql performance tuning steps, include the articles, news, trends, analysis and practical advice about sql performance tuning steps on alibabacloud.com
an execution plan, and stored in a database of SQL statements, is a collection of control flow language, the speed of course fast. 48, the return value of the function is not too large, this overhead is very large. A user-defined function that executes as a cursor consumes a large amount of resources if a large result is returned with a stored procedure. 49, as far as possible to avoid repeated access to the same or several tables, especially the lar
released, the data page will not be in the memory of the data cache, This causes the memory problem to be the bottleneck of the disk. PAGEIOLATCH_EX is write data, this is generally the disk write speed obviously keep up, and memory is not directly related. Here is the resource wait time for query pageiolatch_x: Select Wait_type,
waiting_tasks_count,
Wait_time_ms,
Max_wait_time_ms,
Signal_wait_time_ms
from sys.dm_os_wait_stats
wherelike' pageiolatch%'
order by Wait_type Through the above
rownumObviously, this writing will result in reading the table first, then sorting, and then taking the first 5 records, the plan is as follows:If we write like this, the semantics are the same, but it saves a lot of reading and sorting costs:Select/*+ Index (T1,IDX1_T1) */* from T1 where rownumThe execution plan for this SQL is as follows:As you can see, the SQL does not follow the hint instructions and s
1. Check the database space usage to see which tables are consuming larger disk spaceExecute the following statement:SelectO.name, SUM (p.reserved_page_count) asReserved_page_count, SUM (p.used_page_count) asUsed_page_count, SUM ( CaseWhen (p.index_id2) Then (p.in_row_data_page_count+P.lob_used_page_count+p.row_overflow_used_page_count)Elsep.lob_used_page_count+P.row_overflow_used_page_count End) asDataPages, SUM ( CaseWhen (p.index_id2) then Row_countElse 0end) asrowcounts fromsys.dm_db_partiti
DISTINCTdatabase_id,object_idFrom Sys.dm_db_missing_index_details) as Ddmid on ddmid.database_id = ddios.database_idand ddmid.object_id = ddios.object_idWHERE Ddios.page_lock_wait_in_ms > 0 and object_name (ddios.[ OBJECT_ID]) like ' Pos_transmst 'ORDER by Ddios.page_lock_wait_count DESC;/*******************************************************************************************--page IO Latch Wait *******************************************************************************************/ SEL
not in with not existsIn a subquery, the NOT IN clause performs an internal sort and merge, in either case, not in is the least effective because it performs a full table traversal of the table in the subquery, and in order to avoid using not, it can be written as an outer join (Outer Joins) or not EXISTSLow efficiencySELECT *FROM dbo. OrdersWHERE id_p>0 and Id_p not in (SELECT IdFROM dbo. Persons)EfficientSELECT *From OrdersWHERE id_p >0 and not EXISTS (SELECT IdFrom Persons WHERE persons.id =
specific application requires the participation of the Operation Department, product department, Development Department, O M department, QA (test), Monitoring Department, and so on. The same project (business) has performance problems, performance Tuning is not only required by the O M department, but also solved this perf
performance problems, performance tuning is not only required by the O M Department, but also solved this performance problem by the department. It may occur in products, programs (*. php), business needs, or O M environments. However, most of the performance
a Development Environment-QA project testing-Launch the O M Project-Monitoring for project monitoring-To develop a specific application, the Operation Department, product department, Development Department, O M department, QA (test), and monitoring department are required.Performance problems exist in the same project (business), not only the O M department needs performance optimization, but the Department solves this
planning
Instance Tuning
Instance optimization
SQL Tuning
SQL optimization
1.1.1 Performance PlanningBefore starting on the instance or SQL tuningsections of this guide, make sure you have read part II, "
I will share 11 practical tips on Java performance tuning and java Tuning
Most developers think that performance optimization is a complicated problem and requires a lot of experience and knowledge. Yes, it is not wrong. It is not easy to optimize the application to achieve the best
MySQL performance tuning and Architecture Design-the idea and solution of the High Availability design in Chapter 17th, mysql Tuning
Chapter 1 High Availability design ideas and solutions
Preface:
The database system is the core part of an application system. To ensure the overall availability of the system, the database system cannot have any problems. For an en
introduced after optimization;
2 Optimizing the code tends to make the code more difficult to understand and maintain;
3 code optimized on one platform may be worse on another platform;
4) spend a lot of time on the optimization of code, improve a little performance, but led to obscure code. Indeed, before we optimize, we must carefully consider whether it is worthwhile to optimize.
1.3 Steps for
StepsGeneral performance issues tuning steps: Step One : Identify the problemApplication code: In general, the performance problems of many programs are written, so for the module that finds the bottleneck, you should first check the code. database configuration: Often causes the entire system to run slowly, some la
tuning can be simply summed up in four steps:
Load test
Container tuning
Application Tuning
Iterations
Like most computer science, performance tuning is an iterative process. First, create an appropriate load test that inclu
11 simple Java performance tuning techniques, java Tuning
Most developers naturally think that performance optimization is complex and requires a lot of experience and knowledge. Well, it cannot be said that this is completely wrong. Optimizing applications to achieve optimal perfo
Label:Original: SQL Server Tuning series advanced (How to index tuning)ObjectiveIn the previous article we analyzed the role of statistical information in the database, and we have learned how the database uses statistics to control the distribution of the contents of tables in the database. Children's shoes are not clear and can be clicked for reference.As a
MySql performance tuning policy and mysql tuning policy
This topic provides detailed parameter descriptions for my. cnf configuration.
The sample configuration is as follows:
# Cat my. cnf
# MySQL client library initialization.
[Client]
Port
= 3306
Socket =/tmp/mysql. sock
Character-set-server = utf8
# The MySQL server
[Mysqld]
Init_connect = 'set na
Database Tuning tutorial (4) Explain performance analysis command, tuning explain
In the previous chapter, we learned how to find slow queries and record statements into logs. How can we know where statement problems occur after slow queries are found. This chapter describes how to use the database performance analysis
understand and maintain;3) optimized code on one platform may be worse on another platform;4) spend a lot of time on the optimization of the code, improve a little performance, but led to obscure code. Indeed, before optimization, we must carefully consider whether it is worthwhile to optimize.1.3 Tuning StepsGenerally we improve the performance of the applicati
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.