Knowledge Drop

How to kill long running queries through the API

  • 7 July 2021
  • 1 reply
  • 246 views

Userlevel 1

Last tested: Apr 8, 2020
 

To kill a long running query through the API, you can first get a list of all running queries through the `all_running_queries` endpoint and write a script where if the running time is greater than threshold, then `kill_query`.

Example code here: Kill Long Running Queries

If you want to kill any long running queries that are not part of a scheduled report, the all_running_queries endpoint has a source field and you can exclude the source in the example script.

 

This content is subject to limited support.                

 

 


1 reply

Hey @mandy.chan 

Hope you are well.

The lonk to Kill Long Running Queries  does not work any more,

Will you please fix?

thanks

Reply