As SQL Server 2008 gets more and more into the spotlight, there's a growing number of voices saying that SQL Server 2008 (Kaitmai) is just a patch pack for SQL Server 2005. That's what I thought, too, because we put too much atten
attempt to allocate memory from the same memory object, the waiting time may be extended.CxpacketThis occurs when you try to synchronize the query processor exchange iterator. If the competition for this waiting type becomes a problem, you can reduce the degree of parallelism.Deadlock_enum_mutexWhen the deadlock monitor and SYS. dm_ OS _waiting_tasks attempt to ensure that multiple
returned, the stored procedure is used. 42. Do not use the same function repeatedly in one sentence, waste resources, and put the result in a variable before calling it faster. 43. The efficiency of select count (*) is low. Try to change the method while exists is fast. Note the difference: Select count (FieldOf null) from table and select count (field of not null) from tableThe returned values are different !!! 44. When the server has enough m
. the Resea RCH involved-ideas. The first idea is a "picoprocess" which consists of an empty address space, a monitor proce SS that interacts with the host operating system on behalf of the picoprocess, and a kernel driver that allows a driver to Populate the address space at startup and implements a host application Binary Interface (ABI) that allows the picoproces s to interact with the host. the second idea is a user mode Library OS sometimes refer
--parameter 2: Service nameexecMaster.dbo.xp_servicecontrol'querystate','MSSQLServer'execMaster.dbo.xp_servicecontrol'querystate','SQLServerAgent'execMaster.dbo.xp_servicecontrol'querystate','SQLBrowser'execMaster.dbo.xp_servicecontrol'querystate','NetLogon'EXECXp_servicecontrol N'Stop'N'SQLServerAgent'EXECXp_servicecontrol N'Start'N'SQLServerAgent'(2) SQL invoke operating system commandsif object_id('tempdb: #tmp_started_services') is not NULL Dr
Label:I. Introduction to SQL Profiler Tools SQL Profiler is a graphical interface and a set of system stored procedures that function as follows:
Graphical monitoring of SQL Server queries;
Collect query information in the background;
Analyze performance;
Diagnosing a problem like a
the result in a variable before calling it faster. 43. The efficiency of Select COUNT (*) is low. Try to change his writing style as much as possible, while EXISTS is fast. note the difference: the return values of select count (Field of null) from Table and select count (Field of NOT null) from Table are different !!! 44. When the server has enough memory, the number of preparation threads = the maximum number of connections + 5, which can maxim
cursor. If a large result is returned, the stored procedure is used.42. Do not use the same function repeatedly in one sentence, waste resources, and put the result in a variable before calling it faster.43. The efficiency of select count (*) is low. Try to change his writing style as much as possible, while exists is fast. note the difference: the return values of select count (field of null) from table and select count (field of not null) from table are different !!!44. When the
45. Access your table in a certain order. If you lock table A and table B first, lock them in this order in all stored procedures. If you first lock table B in A stored procedure and then lock Table A, this may lead to A deadlock. If the lock sequence is not designed in detail in advance, it is difficult to find deadlocks.
46. Monitor the load of the corresponding hardware through
I. Introduction to SQL Profiler toolsTransferred from: http://www.cnblogs.com/kissdodog/p/3398523.htmlSQL Profiler is a graphical interface and a set of system stored procedures that function as follows:
Graphical monitoring of SQL Server queries;
Collect query information in the background;
Analyze performance;
Diagnosing a problem like a
Deadlock Dead lock
Exception Handling Exception handler
Transaction and nested Transaction (nested)
Index
Best Practice
Performance Optimization
Classic SQL statements
SQL Server Profile monitoring performance
Execution Plan (reference)
Usage of XML in SQL
actually processes the data, and the source database is in this server. The secondary server (secondary server) holds the destination database, which is used to replicate and back up the transaction log files for the source database. The Monitoring server (monitor
AJAX.
6. Database
The database is the focus of my optimization. Because it is a database of SQL Server 2000, there is no DMV, no performance monitor for SSMS, no indexes included ...... There are too many useful functions, which is very inconvenient. In general, I think the optimization of database performance is mainly in three directions:
Optimize the inde
blocked until: The conflict lock is freed and the connection acquires the requested lock. The time-out interval for the connection has expired. There is no time-out interval by default, but some applications set a time-out interval to prevent waiting indefinitely Five customizations of locks in SQL Server 1 handling deadlocks and setting deadlock priority Deadlo
efficiency of Select COUNT (*) is low. Try to change his writing style as much as possible, while EXISTS is fast. note the difference: the return values of select count (Field of null) from Table and select count (Field of NOT null) from Table are different !!!44. When the server has enough memory, the number of preparation threads = the maximum number of connections + 5, which can maximize the efficiency; otherwise, use the number of prepared thread
. If you lock table A and table B first, lock them in this order in all stored procedures. If you first lock table B in a stored procedure and then lock Table A, this may lead to a deadlock. If the lock sequence is not designed in detail in advance, it is difficult to find deadlocks.
46. Monitor the load of the corresponding hardware through SQL
until the exclusive lock is released, preventing multiple operations on the same resource at the same time.
Update Lock (U): Prevent deadlock in the lock mode, two transactions to a data resource read first in the case of modification, use of shared and exclusive locks sometimes deadlock phenomenon, and the use of update locks can avoid the occurrence of deadlocks. A resource's update lock can only be
threads = maximum number of connections + 5 to maximize efficiencyOtherwise, use the number of prepared threads 45,Access your table in a certain order. If you lock table A and table B firstIn this order in all stored proceduresTo lock them. If you first lock table B in A stored procedure and then lock Table A, this may lead to A deadlock. If the lock sequence is not designed in detail in advance, it is difficult to find deadlocks.46. PassSQL
index 477
23.2.3 using T-SQL Full-text data Definition Language 478
23.2.4 example of using T-SQL to create a FULL-TEXT index 482
23.2.5 Delete Full-text index from datasheet 484
23.2.6 Delete Full-text catalog from database 484
23.3 Use full-text search 484
23.3.1 Custom Data Dictionary 484
23.3.2 search for a specific word or phrase 486
23.3.3 Execution Prefix search 486
24th Chapter Processing XML Data
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 computed column created causes query not to be optimized4. Insufficient memory5. Slow network speed6, the amount of data queried is too
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.