Created
February 24, 2019 23:44
-
-
Save onelharrison/908d3b6f16c44d44d371d5bc4ea1e1dc to your computer and use it in GitHub Desktop.
Useful queries for working with AWS Redshift
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| -- find recent queries that hit disk | |
| SELECT query, substring | |
| FROM svl_qlog join svl_query_summary using(query) | |
| WHERE starttime > date(getdate()) - interval '1 day' | |
| AND is_diskbased = 't'; | |
| -- see query execution details | |
| SELECT query, step, rows, workmem, label, is_diskbased | |
| FROM svl_query_summary | |
| WHERE query = 321925 | |
| ORDER BY workmem DESC; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment