Because the version of a maintained project cannot be affected, many developers have experienced it, especially as the table data volume increases, so the performance of some SQL statements is getting worse and worse. In this way, as the number of visits increases, it puts a lot of pressure on the database.
In order to quickly reduce the pressure on the database and check the quality of SQL statements in the future, only the SQL statements that are banned for execution for more than 200 milliseconds are set in the database, after the SQL statement execution time is configured, the pressure on the database is reduced a lot.
However, this is only a temporary solution to improve performance at the cost of temporarily sacrificing some features. Therefore, we need to consider the time needed. However, this setting is good for checking the performance of SQL statements written later.
The setting method is as follows:
In the Enterprise Manager (SQL Server Management studio express:
Root directory-> right-click Properties-> connection-> use the query controller to prevent long-running queries. Check this item and enter the maximum execution time in the text box below.
Note that the unit is ms. We recommend that you set it to 200 ms, but this is determined by the hardware strength and access pressure of each project.
Below (the English version of SQL Server 20005 and the Chinese version of 2005 ):
Right-click to select connection
Configuration details (English Version SQL Server 2005)
Configuration details (Chinese Version SQL Server 2005)