Question: dbeaver how to cancel query?
Answer: You may stop script execution by pressing "Cancel" in progress dialog (if you hide progress dialog then you may access execution progress from the status bar). If some script query executes too long then it will be canceled and the rest lines will be just ignored.