Last active
July 13, 2019 23:43
-
-
Save galanteh/44d6f022c00290ea947f520488acf84e to your computer and use it in GitHub Desktop.
Get the temp table logs from Vertica for Navigator Optimizer
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
/* Temp table logs */ | |
SELECT anchor_table_schema || '.' || anchor_table_name as TABLE_NAME, | |
projection_column_count as AVG_ROW_LEN, | |
SUM(row_count) as NUM_ROWS, | |
CASE | |
WHEN row_count<=99999 THEN 'x-small' | |
WHEN row_count<=999999 THEN 'small' | |
WHEN row_count<=99999999 THEN 'medium' | |
WHEN row_count<=999999999 THEN 'large' | |
WHEN row_count>999999999 THEN 'x-large' | |
END as ROW_RANGE | |
FROM v_monitor.projection_storage | |
GROUP BY anchor_table_schema, anchor_table_name, projection_column_count, row_count |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment