Home > Database > Mysql Tutorial > body text

How to end a statement in mysql?

藏色散人
Release: 2020-09-17 09:19:28
Original
10369 people have browsed it

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;
Copy after login

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!

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template