When using Vertica, you often encounter the need to forcibly end or interrupt a time-consuming query. In this case, you can use the INTERRUPT_STATEMENT () provided by Vertica () INTERRUPT_STATEMENT requires two parameters. The first parameter is session_id, and the second parameter is statement_id.
When using Vertica, you often encounter the need to forcibly end or interrupt a time-consuming query. In this case, you can use the INTERRUPT_STATEMENT () provided by Vertica () INTERRUPT_STATEMENT requires two parameters. The first parameter is session_id, and the second parameter is statement_id.
When using Vertica, you often encounter the need to forcibly end or interrupt a time-consuming query. In this case, you can use the INTERRUPT_STATEMENT () provided by Vertica () INTERRUPT_STATEMENT requires two parameters. The first parameter is session_id, and the second parameter is statement_id. Both parameters can be obtained from the sessions table.
First, check the session_id and statement_id to end from the sessions table.
1 |
SELECT * FROM sessions; |
Then execute
1 |
SELECT INTERRUPT_STATEMENT(' ' , ' ' ); |
You can also use the following command to close the session
12 |
SELECT CLOSE_ALL_SESSIONS();SELECT CLOSE_SESSION('session_id'); |