query statement execution sequence
The SQL SERVER query execution steps are very many from the microscopic perspective. Here, I want to introduce the concepts of logical reading and so on, from a high-level abstract level:
The figure is rough.
I will explain it as follows. When a query statement is run, SQL SERVER takes the first step to generate an execution plan (occupying CPU and memory resources ), synchronize the estimated data to the disk to obtain the required data (occupying IO resourc
During SQL server startup, the startup information will be read from the Registry first. Sometimes, when SQL Server cannot be started, we need to modify the registry. But where is the SQL server information stored in the registry? From the Internet
During SQL server startup, the startup information will be read from the Registry first. Sometimes, when SQL Server cannot be started, we need to modify the registry. But where is the SQL server information stored in the registry? From the Internet
perspective. Here, I want to introduce the concepts of logical reading and so on, from a high-level abstract level:
The figure is rough.
I will explain it as follows. When a query statement is run, SQL SERVER takes the first step to generate an execution plan (occupying CPU and memory resources ), synchronize the estimated data to the disk to obtain the required data (occupying IO resources, which is pre-read). Note that the first two steps are parallel, SQL SERVER improves query performanc
. In addition, we can see from this example that the parameterized query not only optimizes the memory usage of SQL Server, but also enables repeated use of the previously compiled execution plan, so that the subsequent execution does not need to be re-compiled. It takes only one second to execute 10000 queries.
2. Check and analyze the execution plans in the SQL Server execution Cache
Through the above introduction, we can see the memory size occupied by the SQL cache. It is also known that th
Program Development language: VB6.0 Database: AccessProgram function: This system mainly serves the management Area motor vehicle of the DMV, and the driver related information, this system consists of the following major function modules.One: Vehicle file management (vehicle file establishment, vehicle file query, vehicle file deletion, vehicle file change query and so on.)II: Vehicle Operation management (vehicle Operation table, vehicle operation e
;" >, command wait_time , wait_type wait_resource from sys. dm_exec_requests where Command = ' DB STARTUP ' You can force the release of a lock through a kill session. 3.because of resource contention,RedoThe thread is dropped. Large report behavior reduces secondary performance, causing redo threads to be dropped Reason:when the applicationLogRecords,Redothread readsLogrecord, and apply theseLogAccessing DataPage. PageAccess can causeIobottlenecks, ifPageis not in memory. If there
Cross-compiling:Tar xjf freetype-2.4.10.tar.bz2./configure--host=arm-linuxMakeMake destdir= $PWD/tmp Install Find-name stdio.h Usually use the #include The compiled header file should be put in:/work/tools/gcc-3.4.5-glibc-2.3.6/arm-linux/include The compiled library file should be put in:/work/tools/gcc-3.4.5-glibc-2.3.6/arm-linux/lib Copy the tmp/usr/local/lib/* to the/work/tools/gcc-3.4.5-glibc-2.3.6/arm-linux/lib.sudo cp */work/tools/gcc-3.4.5-glibc-2.3.6/arm-linux/lib-d-RFCP *so*/work/nfs
. Sometimes notice a single session repeating multiple times in a DMV output. This happens because of parallel queries. A parallel query uses the same session to communicate with the client, but on the SQL Server side multiple worker (threads ) is assigned to service this request. So if you see multiple rows with the same session ID, know that the query request was being serviced by multiple threads.
Connections –this is the actual physical con
of 1 to 100, and the first no space number string.Now the sister has been angry, garlic to find you write a program to quickly restore the experimental data.InputThe input file has a line that is a string-the experimental data that was messed up by the garlic.The length of the string is between 1 and 100.OutputOutput a total of one row for the sister's original test data--1 to n output.There is a space between any of the two data.Example 1Input:4111109876532Output:4 1 11 10 9 8 7 6 5 3 2Title A
optimizer. In this example, full indicates that the optimizer is fully optimized. This is further prompted in the attribute "statement terminal cause" because "find a good enough plan". So, the optimizer spends 21ms to capture a plan that is considered good enough in this situation. You can also view the query plan hash value for the execution plan.The second optimizer information turns out to be a dynamic management view sys.dm_exec_query_optimizer_info. This
this operation.
2. Use sqlserver profiler to capture statements, find SQL statements that consume performance, and optimize them. It can be said that SQL statements are like the performance keys of SQL Server. More than 80% of SQL Server performance problems are caused by SQL statements.
3. Optimize statements and stored procedures based on statements with the most CPU resources accumulated and stored procedures that need to be edited most frequently
--
N a long time ago, I read the technical insider's section on CPU analysis. I wrote one article, but before I finish writing it, I have something to do. Later I thought I had published it. I saw it in the draft box today.
I sorted it out and published it...
The Analysis of CPU utilization focuses on CPU bottlenecks, compilation, and decompilation.
1. CPU bottleneck
You can check the Processor: % Processor Time counter in PERFMON to determine whether there is a hard bottleneck. If the value 1 is t
The memory node of the memory node is divided into several pieces of memory. In the NUMA system, a NUMA node corresponds to a memory node. The main function is to provide the allocation location. This statement comes from the SQL Server survival tips that are hard to understand. It should be used to allocate memory. It can also be understood as the original location of the physical memory.
The memory clerk memory. If the Memory Manager client needs to allocate the memory, it must first establis
before using these statements to clear the cache, especially in the production environment. These have a great impact on performance. After clearing the cache, SQL Server needs to re-read data from the data page. In addition, SQL Server needs to generate a new execution plan. Therefore, you need to be clear about the impact on the production or test environment before cleaning.
Dynamic management object
SQL Server 2005 introduces dynamic management objects, such as
Introduction to database waiting queue (on)
This articleArticleThe purpose is to help DBAs, developers, and other database users explain what is a database waiting queue.
Performance OptimizationWith the launch of SQL Server 2005, it contains a lot of dynamic management views (DMV) and functions, we need to use these dynamic management objects to help us diagnose and eliminate performance.
For performance, the most perceptible phenomenon is t
and fill factor introduction, I will follow up onArticleWe need to re-create the index to speed up the performance:
For example, a clustered index and a non-clustered index created on test_tb2 can be queried using the DMV statement:
Select index_type_desc, alloc_unit_type_desc, avg_fragmentation_in_percent, fragment_count, avg_fragment_size_in_pages, page_count, record_count, and SYS sys. dm_db_index_physical_stats (db_id ('adventureworks'), obje
SQL Server CPU performance check and optimization related SQL statements, very good SQL statements, recorded here:
-- Begin SQL related to CPU Analysis and Optimization -- use DMV to analyze statements that have used the most CPU resources since SQL Server was started. For example, the following statement can list the top 50. Select c.last_execution_time,c.exe cution_count, C. total_logical_reads, C. total_logical_writes, C. total_elapsed_time, C. la
SQL Server Performance Tuning methodology and common tools, SQL Server Tuning
In earlier articles, we mentioned the DETECT methodology in Performance Tuning. Here we will briefly review the DETECT methodology.
Discover the problem: found the problem
Lead e the conditions: Explore causes
Track down possible approaches: provides possible solutions
Execute the most likely approach: the best possible solution for execution
Check of success: Check whether it is successful (if not, repeat the above s
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.