Last active
January 3, 2017 20:47
-
-
Save kerbelp/36784db136a7d02acd818f8a3ad958f1 to your computer and use it in GitHub Desktop.
This file contains 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
CREATE OR REPLACE VIEW admin.v_vacuum_jobs_summary | |
AS | |
SELECT DISTINCT us.usename, perm.name, vac.eventtime, trunc(vac.eventtime) AS date, vac.status, vac."rows", vac.sortedrows | |
FROM stl_vacuum vac | |
JOIN stv_tbl_perm perm ON perm.id = vac.table_id | |
JOIN pg_user us ON us.usesysid = vac.userid | |
WHERE trunc(vac.eventtime) >= trunc('now' - 1) | |
ORDER BY vac.eventtime DESC; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment