When I did show processlist;
It shows status Killed
and query NULL
in one of the line.
Should we kill this NULL
query using Kill QUERY_ID
?
Will this impact to database?
When I did show processlist;
It shows status Killed
and query NULL
in one of the line.
Should we kill this NULL
query using Kill QUERY_ID
?
Will this impact to database?
When you run a show processlist
you will get something as
mysql> show processlist \G
*************************** 1. row ***************************
Id: 102524
User: someuser
Host: localhost
db: db_name
Command: Query
Time: 0
State: NULL
Info: show processlist
*************************** 2. row ***************************
Id: 102532
User: someuser
Host: host ip
db: db_name
Command: Query
Time: 0
State: Sending data
Info: select .....,
2 rows in set (0.00 sec)
Here it will list out the queries which are being currently getting executed and if you want to kill one of them you need to use the ID
For example from above if I need to kill the query and its ID is 102532
it could be done as
kill 102532
Now what are the consequences, say you are running a report which is using some query and its either executing or sending the data and if you kill in the mid then the report data will not have proper value considering the query returning some data.
In most cases the select takes time than insert or delete or update unless its a mass delete or update or insert.
As far as impact on database is concern for select it will have no impact, for insert/update/delete yes you may not have data inserted/updated or deleted if the query is still active.
You can get the complete information of the query using
show full processlist