0

I am using MySQL version 8.0

Whenever I write a query and if it seems to take long I press the interrupt button because previously when I would not press "interrupt" button it would crash my database. Later I would press "interrupt" and did not seem to crash database.

Does pressing "Interrupt" button immediately terminates query? or is it only in our GUI that seems to stop and in the background it is still processing queries?

haneulkim
  • 4,406
  • 9
  • 38
  • 80
  • 1
    why would your super long innefficent query have any affect on other users? You are using innodb right? Interrupt depends on lot of what whatever GUI you are using. Do you want [maximum execution time](https://stackoverflow.com/questions/415905/how-to-set-a-maximum-execution-time-for-a-mysql-query#23319195). Or looking at `EXPLAIN {query}` before running it to see the query plan. – danblack May 22 '20 at 07:29
  • I am using dumped database, when it crashes all people accessing it cannot perform queries until new dumped db is created. This is what I meant to say, sorry for the confusion I've edited. – haneulkim May 22 '20 at 07:32
  • Nope, still noncomprehending. What GUI is Interrupt button, or the big red button on the server case - that defiantly stops the query. What crash - killing mysql? or just reponsiveness? How are you dumping - `mysqldump --single-transaction`? Details detail details. – danblack May 22 '20 at 07:38
  • in workbench, read button with hand sign. Since I am querying to analyze data, since I cannot do that on database that receives data from our app, I've been given backup version so I can do analysis with it. When my query runs for a long time, it stops and won't allow me to query anymore. My co-worker who'd backed up told me that disk is full. – haneulkim May 22 '20 at 07:42

0 Answers0