Created
November 4, 2014 09:31
-
-
Save yujihamaguchi/ec5d4c6c31283e5214e7 to your computer and use it in GitHub Desktop.
[Redshift] テーブルの最終Analyze時刻その他を表示
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
SELECT | |
TO_CHAR(starttime + INTERVAL '9 hour', 'YYYY-MM-DD HH24:MI:SS') AS starttime | |
,TO_CHAR(endtime + INTERVAL '9 hour', 'YYYY-MM-DD HH24:MI:SS') AS endtime | |
,DATE_DIFF('sec', starttime, endtime) AS secs | |
,text | |
FROM | |
svl_statementtext | |
WHERE | |
sequence = 0 | |
AND xid IN ( | |
SELECT | |
xid | |
FROM | |
svl_statementtext s | |
WHERE | |
s.text LIKE 'padb_fetch_sample%' | |
AND s.text LIKE '%<table name>%' | |
) | |
ORDER BY | |
starttime | |
,endtime; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment