Reputation: 716
In our snowflake, we have multiple users accessing the database. And sometimes when query takes long time people are cancelling the query from UI. I was wondering if there is a way to get information about who has cancelled the query. Like we have table QUERY_HISTORY to get information about the query.
Do we have a similar table to get information of query cancelled?
Upvotes: 0
Views: 611
Reputation: 7339
The question is whether there is a table that stores cancelled queries like QUERY_HISTORY, I think. The answer is that even a cancelled query will be in QUERY_HISTORY.
Upvotes: 0
Reputation: 690
Only the user who executed the query can cancel it via the Abort
button in the UI. Other ways to cancel a query would be to issue one of the following functions:
Any one of the above functions that are issued would be a query in the QUERY_HISTORY as well.
A cancelled query will have an error of 604, and I expect that the error code is different if the query has timed out (which by default is set to 2 days).
Upvotes: 1