Home  >  Article  >  Database  >  How to end a statement in mysql?

How to end a statement in mysql?

藏色散人
藏色散人Original
2019-05-13 09:39:0210332browse

How to end a statement in mysql?

How does mysql terminate the currently executing SQL statement? Below I will introduce to you how to implement it.

Operation steps:

show processlist;

Find out the statement you want to stop

Then find out the id of the statement you want to terminate

Under the systemmysqladmin -uroot -ppassword kill will clear the ID to be killed.

MySQL query statement execution process:

1. The client sends a query to the server;

2. The server first checks the query cache. If the cache is hit, the result stored in the cache is returned immediately. Otherwise, enter the next stage;

3. The server performs SQL parsing and preprocessing, and then the optimizer generates the corresponding execution plan;

4. MySQL executes the execution plan based on the execution plan generated by the optimizer. Call the API of the storage engine to execute the query;

5. Return the results to the client.

Related learning recommendations: mysql tutorial

The above is the detailed content of How to end a statement in mysql?. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn