Find file History
A21z Fix v_generate_tbl_ddl view for DISTSTYLE AUTO
2 new values for `reldiststyle` are documented here: https://docs.aws.amazon.com/redshift/latest/dg/viewing-distribution-styles.html (10: AUTO (ALL), 11: AUTO (EVEN))
Plus, I stumbled upon an undocumented value `9` for reldiststyle, (a table that had diststyle `AUTO(EVEN)`)
Latest commit de4d300 Dec 17, 2018
Permalink
Type Name Latest commit message Commit time
..
Failed to load latest commit information.
README.md Update fragmentation script to match view name. Add v_fragmentation_i… Jul 12, 2018
v_check_data_distribution.sql Add distribution and sort keys to the admin dist view Oct 18, 2018
v_check_transaction_locks.sql New VIews Jul 23, 2015
v_check_wlm_query_time.sql New VIews Jul 23, 2015
v_check_wlm_query_trend_daily.sql Handling division by 0 Oct 11, 2016
v_check_wlm_query_trend_hourly.sql Handling division by 0 Jan 19, 2016
v_connection_summary.sql Update v_connection_summary.sql May 10, 2018
v_constraint_dependency.sql modified admin.v_constraint_dependency to include all source schemas Oct 14, 2015
v_extended_table_info.sql v_extended_table_info.sql documentation fix Feb 27, 2017
v_find_dropuser_objs.sql Included pg_library query inside from clause Aug 3, 2018
v_fragmentation_info.sql Add admin schema to v_fragmentation_info.sql view Nov 4, 2018
v_generate_cancel_query.sql Empty line cleanup May 25, 2016
v_generate_cursor_query.sql Add a view to get query of active cursors Sep 14, 2016
v_generate_database_ddl.sql Add v_generate_database_ddl.sql in the same spirit as v_generate_tbl_… Jan 20, 2018
v_generate_group_ddl.sql Adapt views that generate statements to use QUOTE_IDENT for identifie… Jan 16, 2018
v_generate_schema_ddl.sql Add logic to add AUTHORIZATION clause Mar 30, 2018
v_generate_tbl_ddl.sql Fix v_generate_tbl_ddl view for DISTSTYLE AUTO Dec 17, 2018
v_generate_terminate_session.sql Merge + added v_generate_terminate_session.sql May 25, 2016
v_generate_udf_ddl.sql find the prolang from pg_language Jan 30, 2018
v_generate_unload_copy_cmd.sql Filtered tables in pg_internal from v_generate_unload_copy_cmd.sql Mar 14, 2016
v_generate_user_grant_revoke_ddl.sql fixed issue with default privileges revokes Nov 13, 2018
v_generate_user_object_permissions.sql Adapt views that generate statements to use QUOTE_IDENT for identifie… Jan 16, 2018
v_generate_view_ddl.sql Included CASE to check for late binding views Aug 9, 2018
v_get_blocking_locks.sql add view to identify blocking locks as well as determine what/who is … Aug 16, 2017
v_get_cluster_restart_ts.sql Update v_get_cluster_restart_ts.sql Nov 7, 2016
v_get_obj_priv_by_user.sql Adapt views that generate statements to use QUOTE_IDENT for identifie… Jan 16, 2018
v_get_schema_priv_by_user.sql Added AdminView dir and views Mar 5, 2015
v_get_tbl_priv_by_user.sql Filtered tables in pg_internal from v_get_tbl_priv_by_user.sql Mar 14, 2016
v_get_tbl_reads_and_writes.sql Add commit messages in the output, make sure reads and writes are onl… Nov 15, 2016
v_get_tbl_scan_frequency.sql Update v_get_tbl_scan_frequency.sql Oct 9, 2018
v_get_users_in_group.sql Added AdminView dir and views Mar 5, 2015
v_get_vacuum_details.sql Link finished vacuum details to their start Jun 17, 2017
v_get_view_priv_by_user.sql #80: Addressed edge case for objects with names containing '.' May 25, 2016
v_my_last_copy_errors.sql used so creation of views can be re-ran without error messages Sep 5, 2018
v_my_last_query_summary.sql used so creation of views can be re-ran without error messages Sep 5, 2018
v_object_dependency.sql Added AdminView dir and views Mar 5, 2015
v_open_session.sql Added AdminView dir and views Mar 5, 2015
v_query_type_duration_summary.sql Create v_query_type_duration_summary.sql Jul 13, 2016
v_session_leakage_by_cnt.sql Added AdminView dir and views Mar 5, 2015
v_space_used_per_tbl.sql Changed column "tablename" to use "relname" column from pg_class Aug 10, 2018
v_vacuum_summary.sql Update v_vacuum_summary.sql May 5, 2018
v_view_dependency.sql Added AdminView dir and views Mar 5, 2015

README.md

Redshift Admin Views

Views objective is to help with administration of Redshift. All views assume you have a schema called admin.

View Purpose
v_check_data_distribution.sql View to get data distribution across slices
v_check_transaction_locks.sql View to get information about the locks held by open transactions
v_check_wlm_query_time.sql View to get WLM Queue Wait Time , Execution Time and Total Time by Query for the past 7 Days
v_check_wlm_query_trend_daily.sql View to get WLM Query Count, Queue Wait Time , Execution Time and Total Time by Day
v_check_wlm_query_trend_hourly.sql View to get WLM Query Count, Queue Wait Time , Execution Time and Total Time by Hour
v_constraint_dependency.sql View to get the the foreign key constraints between tables
v_extended_table_info.sql View to get extended table information for permanent database tables.
v_fragmentation_info.sql View to list all fragmented tables in the database
v_generate_cancel_query.sql View to get cancel query
v_generate_database_ddl.sql View to get the DDL for a database
v_generate_group_ddl.sql View to get the DDL for a group.
v_generate_schema_ddl.sql View to get the DDL for schemas.
v_generate_tbl_ddl.sql View to get the DDL for a table. This will contain the distkey, sortkey, constraints
v_generate_terminate_session.sql View to get pg_terminate_backend() statements
v_generate_udf_ddl.sql View to get the DDL for a UDF.
v_generate_unload_copy_cmd.sql View to get that will generate unload and copy commands for an object. After running
v_generate_user_grant_revoke_ddl.sql View to gengerate grant or revoke ddl for users and groups in the database
v_generate_user_object_permissions.sql View to get the DDL for a users permissions to tables and views.
v_generate_view_ddl.sql View to get the DDL for a view.
v_get_blocking_locks.sql View to identify blocking locks as well as determine what/who is blocking a query
v_get_cluster_restart_ts.sql View to get the datetime of when Redshift cluster was recently restarted
v_get_obj_priv_by_user.sql View to get the table/views that a user has access to
v_get_schema_priv_by_user.sql View to get the schema that a user has access to
v_get_tbl_priv_by_user.sql View to get the tables that a user has access to
v_get_tbl_reads_and_writes.sql View to get operations performed per table for transactions ID or query ID
v_get_tbl_scan_frequency.sql View to get list of each permanent table's scan frequency
v_get_users_in_group.sql View to get all users in a group
v_get_vacuum_details.sql View to get vacuum details like table name, Schema Name, Deleted Rows , processing time
v_get_view_priv_by_user.sql View to get the views that a user has access to
v_my_last_query_summary.sql View that shows a formatted extract of SVL_QUERY_SUMMARY for the last query run in the session
v_my_last_copy_errors.sql View to see any errors associated with a COPY command that was run in the session and had errors
v_object_dependency.sql View to merge the different dependency views together
v_open_session.sql View to monitor currently connected and disconnected sessions
v_session_leakage_by_cnt.sql View to monitor session leakage by remote host
v_space_used_per_tbl.sql View to get pull space used per table
v_view_dependency.sql View to get the names of the views that are dependent other tables/views