Analyze Schema Statistics
https://www.vertica.com/blog/analyze-statistics-schema-level-part-2-quick-tip/
Based on above knowledge tips, I created a function but i have trouble giving access to individual database users. Only DBA user is able to run that.
Tagged:
0
Comments
Did you grant the EXECUTE privilege?
Example:
dbadmin=> CREATE USER joe; CREATE USER dbadmin=> GRANT EXECUTE ON PROCEDURE analyze_schema_statistics(schema_name VARCHAR) TO joe; GRANT PRIVILEGE dbadmin=> \c - joe You are now connected as user "joe". dbadmin=> SELECT analyze_schema_statistics('test_stats'); analyze_schema_statistics --------------------------- 0 (1 row)