davidhwang
davidhwang

Reputation: 1501

How do you query for currently executing DDL queries in Amazon Redshift?

Note that I'm asking about DDL queries in particular. From the documentation, it's not clear how to do this or if this is even possible.

STL_DDLTEXT seems to only show finished DDL queries.

STV_RECENTS and STV_INFLIGHT don't document whether they show regular queries vs DDL; from experience I have never seen any DDL queries in those system views.

Upvotes: 1

Views: 433

Answers (1)

Rahul Gupta
Rahul Gupta

Reputation: 1802

STV_RECENTS does capture the currently active and recently run queries. The queries include both DDL and DML. I know this because I use it in my script.

If I’ve made a bad assumption please comment and I’ll refocus my answer.

Upvotes: 2

Related Questions