PgHero

Space

Database Size: 133 MB

68 unused indices. Remove them for faster writes.

rails generate migration remove_unused_indexes

And paste

remove_index :annotation, name: "IDX_annotation_org_id_dashboard_id_epoch_end_epoch"
remove_index :annotation, name: "IDX_annotation_org_id_created"
remove_index :annotation, name: "IDX_annotation_org_id_updated"
remove_index :annotation, name: "IDX_annotation_org_id_epoch_end_epoch"
remove_index :annotation, name: "IDX_annotation_org_id_alert_id"
remove_index :annotation, name: "IDX_annotation_alert_id"
remove_index :annotation, name: "IDX_annotation_org_id_type"
remove_index :alert_instance, name: "IDX_alert_instance_rule_org_id_current_state"
remove_index :alert_rule_version, name: "IDX_alert_rule_version_rule_org_id_rule_namespace_uid_rule_grou"
remove_index :api_key, name: "IDX_api_key_org_id"
remove_index :builtin_role, name: "IDX_builtin_role_org_id"
remove_index :builtin_role, name: "IDX_builtin_role_role"
remove_index :builtin_role, name: "IDX_builtin_role_role_id"
remove_index :dashboard_acl, name: "IDX_dashboard_acl_dashboard_id"
remove_index :dashboard_acl, name: "IDX_dashboard_acl_org_id_role"
remove_index :dashboard_acl, name: "IDX_dashboard_acl_permission"
remove_index :dashboard_acl, name: "IDX_dashboard_acl_team_id"
remove_index :dashboard_acl, name: "IDX_dashboard_acl_user_id"
remove_index :dashboard, name: "IDX_dashboard_deleted"
remove_index :dashboard, name: "IDX_dashboard_gnet_id"
remove_index :dashboard, name: "IDX_dashboard_is_folder"
remove_index :dashboard, name: "IDX_dashboard_org_id"
remove_index :dashboard, name: "IDX_dashboard_org_id_folder_id_title"
remove_index :dashboard, name: "IDX_dashboard_org_id_plugin_id"
remove_index :dashboard_tag, name: "IDX_dashboard_tag_dashboard_id"
remove_index :dashboard, name: "IDX_dashboard_title"
remove_index :dashboard_version, name: "IDX_dashboard_version_dashboard_id"
remove_index :data_source, name: "IDX_data_source_org_id"
remove_index :data_source, name: "IDX_data_source_org_id_is_default"
remove_index :login_attempt, name: "IDX_login_attempt_username"
remove_index :org_user, name: "IDX_org_user_org_id"
remove_index :permission, name: "IDX_permission_role_id"
remove_index :preferences, name: "IDX_preferences_user_id"
remove_index :role, name: "IDX_role_org_id"
remove_index :user_auth_token, name: "IDX_user_auth_token_revoked_at"
remove_index :user_auth_token, name: "IDX_user_auth_token_user_id"
remove_index :user, name: "IDX_user_login_email"
remove_index :user_role, name: "IDX_user_role_org_id"
remove_index :user_role, name: "IDX_user_role_user_id"
remove_index :alert, name: "IDX_alert_dashboard_id"
remove_index :alert_notification_state, name: "IDX_alert_notification_state_alert_id"
remove_index :alert, name: "IDX_alert_org_id_id"
remove_index :alert_rule_tag, name: "IDX_alert_rule_tag_alert_id"
remove_index :alert, name: "IDX_alert_state"
remove_index :correlation, name: "IDX_correlation_org_id"
remove_index :correlation, name: "IDX_correlation_source_uid"
remove_index :correlation, name: "IDX_correlation_uid"
remove_index :dashboard_provisioning, name: "IDX_dashboard_provisioning_dashboard_id"
remove_index :dashboard_provisioning, name: "IDX_dashboard_provisioning_dashboard_id_name"
remove_index :dashboard_public, name: "IDX_dashboard_public_config_org_id_dashboard_uid"
remove_index :dashboard_snapshot, name: "IDX_dashboard_snapshot_user_id"
remove_index :file, name: "IDX_file_parent_folder_path_hash"
remove_index :resource_blob, name: "IDX_resource_blob_created"
remove_index :resource, name: "IDX_resource_group_resource"
remove_index :resource_history, name: "IDX_resource_history_group_resource_resource_version"
remove_index :resource_blob, name: "IDX_resource_history_namespace_group_name"
remove_index :resource_history, name: "IDX_resource_history_resource_version"
remove_index :team_member, name: "IDX_team_member_org_id"
remove_index :team_member, name: "IDX_team_member_team_id"
remove_index :team_member, name: "IDX_team_member_user_id_org_id"
remove_index :team, name: "IDX_team_org_id"
remove_index :team_role, name: "IDX_team_role_org_id"
remove_index :team_role, name: "IDX_team_role_team_id"
remove_index :temp_user, name: "IDX_temp_user_code"
remove_index :temp_user, name: "IDX_temp_user_email"
remove_index :temp_user, name: "IDX_temp_user_org_id"
remove_index :user_auth, name: "IDX_user_auth_auth_module_auth_id"
remove_index :user_auth, name: "IDX_user_auth_user_id"
Relation Size
annotation 71.8 MB
IDX_annotation_org_id_dashboard_id_epoch_end_epoch UNUSED 8.2 MB
IDX_annotation_org_id_created UNUSED 6.04 MB
IDX_annotation_org_id_updated UNUSED 6.04 MB
alert_rule_version 4.75 MB
annotation_pkey 4.41 MB
IDX_annotation_org_id_epoch_end_epoch UNUSED 3.95 MB
dashboard_version 3.52 MB
IDX_annotation_org_id_alert_id UNUSED 1.95 MB
IDX_annotation_alert_id UNUSED 1.85 MB
IDX_annotation_org_id_type UNUSED 1.84 MB
alert_instance 1.67 MB
alert_rule 1.23 MB
dashboard 656 KB
UQE_alert_rule_version_rule_org_id_rule_uid_rule_guid_version 544 KB
alert_configuration_history 496 KB
UQE_alert_rule_version_rule_guid_version 304 KB
alert_instance_pkey 224 KB
kv_store 208 KB
migration_log 160 KB
IDX_alert_instance_rule_org_id_rule_uid_current_state 128 KB
permission 120 KB
alert_rule_version_pkey 112 KB
query_history 112 KB
data_source 104 KB
provenance_type 104 KB
alert_configuration 96 KB
IDX_alert_instance_rule_org_id_current_state UNUSED 80 KB
UQE_permission_action_scope_role_id 64 KB
user 64 KB
IDX_alert_rule_version_rule_org_id_rule_namespace_uid_rule_grou UNUSED 56 KB
UQE_provenance_type_record_type_record_key_org_id 56 KB
query_history_details 56 KB
cache_data 48 KB
folder 48 KB
user_auth_token 48 KB
UQE_dashboard_version_dashboard_id_version 40 KB
server_lock 40 KB
dashboard_version_pkey 32 KB
migration_log_pkey 32 KB
permission_pkey 32 KB
provenance_type_pkey 32 KB
secrets 32 KB
IDX_api_key_org_id UNUSED 16 KB
IDX_builtin_role_org_id UNUSED 16 KB
IDX_builtin_role_role UNUSED 16 KB
IDX_builtin_role_role_id UNUSED 16 KB
IDX_dashboard_acl_dashboard_id UNUSED 16 KB
IDX_dashboard_acl_org_id_role UNUSED 16 KB
IDX_dashboard_acl_permission UNUSED 16 KB
IDX_dashboard_acl_team_id UNUSED 16 KB
IDX_dashboard_acl_user_id UNUSED 16 KB
IDX_dashboard_deleted UNUSED 16 KB
IDX_dashboard_gnet_id UNUSED 16 KB
IDX_dashboard_is_folder UNUSED 16 KB
IDX_dashboard_org_id UNUSED 16 KB
IDX_dashboard_org_id_folder_id_title UNUSED 16 KB
IDX_dashboard_org_id_plugin_id UNUSED 16 KB
IDX_dashboard_tag_dashboard_id UNUSED 16 KB
IDX_dashboard_title UNUSED 16 KB
IDX_dashboard_version_dashboard_id UNUSED 16 KB
IDX_data_source_org_id UNUSED 16 KB
IDX_data_source_org_id_is_default UNUSED 16 KB
IDX_login_attempt_username UNUSED 16 KB
IDX_org_user_org_id UNUSED 16 KB
IDX_org_user_user_id 16 KB
IDX_permission_identifier 16 KB
IDX_permission_role_id UNUSED 16 KB
IDX_preferences_org_id 16 KB
IDX_preferences_user_id UNUSED 16 KB
IDX_query_history_org_id_created_by_datasource_uid 16 KB
IDX_role_org_id UNUSED 16 KB
IDX_user_auth_token_revoked_at UNUSED 16 KB
IDX_user_auth_token_user_id UNUSED 16 KB
IDX_user_login_email UNUSED 16 KB
IDX_user_role_org_id UNUSED 16 KB
IDX_user_role_user_id UNUSED 16 KB
UQE_alert_configuration_org_id 16 KB
UQE_api_key_key 16 KB
UQE_api_key_org_id_name 16 KB
UQE_builtin_role_org_id_role_id_role 16 KB
UQE_cache_data_cache_key 16 KB
UQE_dashboard_acl_dashboard_id_team_id 16 KB
UQE_dashboard_acl_dashboard_id_user_id 16 KB
UQE_dashboard_org_id_uid 16 KB
UQE_data_source_org_id_name 16 KB
UQE_data_source_org_id_uid 16 KB
UQE_folder_org_id_uid 16 KB
UQE_kv_store_org_id_namespace_key 16 KB
UQE_org_name 16 KB
UQE_org_user_org_id_user_id 16 KB
UQE_role_org_id_name 16 KB
UQE_role_uid 16 KB
UQE_server_lock_operation_uid 16 KB
UQE_short_url_org_id_uid 16 KB
UQE_signing_key_key_id 16 KB
UQE_star_user_id_dashboard_id 16 KB
UQE_star_user_id_dashboard_uid_org_id 16 KB
UQE_user_auth_token_auth_token 16 KB
UQE_user_auth_token_prev_auth_token 16 KB
UQE_user_email 16 KB
UQE_user_login 16 KB
UQE_user_role_org_id_user_id_role_id_group_mapping_uid 16 KB
UQE_user_uid 16 KB
alert_configuration_history_pkey 16 KB
alert_configuration_pkey 16 KB
api_key 16 KB
api_key_pkey1 16 KB
builtin_role_pkey 16 KB
cache_data_pkey 16 KB
dashboard_acl_pkey 16 KB
dashboard_pkey1 16 KB
dashboard_tag_pkey 16 KB
data_keys 16 KB
data_keys_pkey 16 KB
data_source_pkey1 16 KB
folder_pkey 16 KB
kv_store_pkey 16 KB
login_attempt_pkey1 16 KB
org 16 KB
org_pkey 16 KB
org_user_pkey 16 KB
preferences 16 KB
preferences_pkey 16 KB
query_history_details_pkey 16 KB
query_history_pkey 16 KB
resource_migration_log 16 KB
resource_migration_log_pkey 16 KB
role 16 KB
role_pkey 16 KB
secrets_pkey 16 KB
server_lock_pkey 16 KB
short_url 16 KB
short_url_pkey 16 KB
signing_key 16 KB
signing_key_pkey 16 KB
star_pkey 16 KB
user_auth_token_pkey 16 KB
user_pkey1 16 KB
user_role_pkey 16 KB
IDX_alert_dashboard_id UNUSED 8 KB
IDX_alert_notification_state_alert_id UNUSED 8 KB
IDX_alert_org_id_id UNUSED 8 KB
IDX_alert_rule_tag_alert_id UNUSED 8 KB
IDX_alert_state UNUSED 8 KB
IDX_anon_device_updated_at 8 KB
IDX_correlation_org_id UNUSED 8 KB
IDX_correlation_source_uid UNUSED 8 KB
IDX_correlation_uid UNUSED 8 KB
IDX_dashboard_provisioning_dashboard_id UNUSED 8 KB
IDX_dashboard_provisioning_dashboard_id_name UNUSED 8 KB
IDX_dashboard_public_config_org_id_dashboard_uid UNUSED 8 KB
IDX_dashboard_snapshot_user_id UNUSED 8 KB
IDX_file_parent_folder_path_hash UNUSED 8 KB
IDX_resource_blob_created UNUSED 8 KB
IDX_resource_group_resource UNUSED 8 KB
IDX_resource_history_group_resource_resource_version UNUSED 8 KB
IDX_resource_history_namespace_group_name UNUSED 8 KB
IDX_resource_history_resource_version UNUSED 8 KB
IDX_team_member_org_id UNUSED 8 KB
IDX_team_member_team_id UNUSED 8 KB
IDX_team_member_user_id_org_id UNUSED 8 KB
IDX_team_org_id UNUSED 8 KB
IDX_team_role_org_id UNUSED 8 KB
IDX_team_role_team_id UNUSED 8 KB
IDX_temp_user_code UNUSED 8 KB
IDX_temp_user_email UNUSED 8 KB
IDX_temp_user_org_id UNUSED 8 KB
IDX_temp_user_status 8 KB
IDX_user_auth_auth_module_auth_id UNUSED 8 KB
IDX_user_auth_user_id UNUSED 8 KB
UQE_alert_image_token 8 KB
UQE_alert_notification_org_id_uid 8 KB
UQE_alert_notification_state_org_id_alert_id_notifier_id 8 KB
UQE_alert_rule_state_org_id_rule_uid 8 KB
UQE_alert_rule_tag_alert_id_tag_id 8 KB
UQE_annotation_tag_annotation_id_tag_id 8 KB
UQE_anon_device_device_id 8 KB
UQE_cloud_migration_session_uid 8 KB
UQE_cloud_migration_snapshot_uid 8 KB
UQE_dashboard_public_config_access_token 8 KB
UQE_dashboard_public_config_uid 8 KB
UQE_dashboard_snapshot_delete_key 8 KB
UQE_dashboard_snapshot_key 8 KB
UQE_file_meta_path_hash_key 8 KB
UQE_file_path_hash 8 KB
UQE_library_element_connection_element_id_kind_connection_id 8 KB
UQE_library_element_org_id_folder_id_name_kind 8 KB
UQE_library_element_org_id_folder_uid_name_kind 8 KB
UQE_library_element_org_id_uid 8 KB
UQE_ngalert_configuration_org_id 8 KB
UQE_playlist_org_id_uid 8 KB
UQE_plugin_setting_org_id_plugin_id 8 KB
UQE_query_history_star_user_id_query_uid 8 KB
UQE_quota_org_id_user_id_target 8 KB
UQE_resource_history_namespace_group_name_version 8 KB
UQE_resource_namespace_group_resource_name 8 KB
UQE_resource_version_group_resource 8 KB
UQE_seed_assignment_builtin_role_action_scope 8 KB
UQE_seed_assignment_builtin_role_role_name 8 KB
UQE_tag_key_value 8 KB
UQE_team_member_org_id_team_id_user_id 8 KB
UQE_team_org_id_name 8 KB
UQE_team_org_id_uid 8 KB
UQE_team_role_org_id_team_id_role_id 8 KB
alert 8 KB
alert_image 8 KB
alert_image_pkey 8 KB
alert_notification 8 KB
alert_notification_pkey 8 KB
alert_notification_state_pkey 8 KB
alert_pkey 8 KB
alert_rule_state 8 KB
alert_rule_state_pkey 8 KB
alert_rule_tag_pkey 8 KB
annotation_tag_pkey 8 KB
anon_device 8 KB
anon_device_pkey 8 KB
builtin_role 8 KB
cloud_migration_resource 8 KB
cloud_migration_resource_pkey 8 KB
cloud_migration_session 8 KB
cloud_migration_session_pkey 8 KB
cloud_migration_snapshot 8 KB
cloud_migration_snapshot_pkey 8 KB
correlation 8 KB
correlation_pkey1 8 KB
dashboard_acl 8 KB
dashboard_provisioning 8 KB
dashboard_provisioning_pkey1 8 KB
dashboard_public 8 KB
dashboard_public_config_pkey 8 KB
dashboard_snapshot 8 KB
dashboard_snapshot_pkey 8 KB
dashboard_tag 8 KB
entity_event 8 KB
entity_event_pkey 8 KB
file 8 KB
file_meta 8 KB
library_element 8 KB
library_element_connection_pkey 8 KB
library_element_pkey 8 KB
login_attempt 8 KB
ngalert_configuration 8 KB
ngalert_configuration_pkey 8 KB
org_user 8 KB
playlist 8 KB
playlist_item 8 KB
playlist_item_pkey 8 KB
playlist_pkey 8 KB
plugin_setting 8 KB
plugin_setting_pkey 8 KB
query_history_star_pkey 8 KB
quota_pkey 8 KB
resource 8 KB
resource_blob 8 KB
resource_blob_pkey 8 KB
resource_history 8 KB
resource_history_pkey 8 KB
resource_pkey 8 KB
seed_assignment 8 KB
seed_assignment_pkey 8 KB
session 8 KB
session_pkey 8 KB
sso_setting 8 KB
sso_setting_pkey 8 KB
star 8 KB
tag_pkey 8 KB
team_member_pkey 8 KB
team_pkey 8 KB
team_role_pkey 8 KB
temp_user 8 KB
temp_user_pkey1 8 KB
test_data_pkey 8 KB
user_auth 8 KB
user_auth_pkey 8 KB
user_external_session 8 KB
user_external_session_pkey 8 KB
user_role 8 KB
alert_notification_state 0 Bytes
alert_rule_tag 0 Bytes
annotation_tag 0 Bytes
library_element_connection 0 Bytes
query_history_star 0 Bytes
quota 0 Bytes
resource_version 0 Bytes
tag 0 Bytes
team 0 Bytes
team_member 0 Bytes
team_role 0 Bytes
test_data 0 Bytes