PgHero

Space

Database Size: 11.6 MB

38 unused indices. Remove them for faster writes.

rails generate migration remove_unused_indexes

And paste

remove_index :contacts, name: "attendant_connection_idx"
remove_index :bgw_job, name: "bgw_job_proc_hypertable_id_idx"
remove_index :bgw_job_stat_history, name: "bgw_job_stat_history_job_id_idx"
remove_index :contacts, name: "connection_attendant_idx"
remove_index :contacts, name: "connection_lastContact_idx"
remove_index :contacts, name: "connection_lastMessage_idx"
remove_index :contacts, name: "connection_unread_idx"
remove_index :contacts, name: "contact_inactive_idx"
remove_index :tags, name: "folderId_tags_idx"
remove_index :custom_field_connections, name: "idx_cf_connections_custom_field_id"
remove_index :column_task, name: "idx_column_task_connectionId"
remove_index :column_task, name: "idx_column_task_pipelineId"
remove_index :contact_pipelines, name: "idx_contact_pipelines_attributedIn"
remove_index :contact_pipelines, name: "idx_contact_pipelines_columnId"
remove_index :contact_pipelines, name: "idx_contact_pipelines_userId"
remove_index :custom_fields, name: "idx_custom_fields_connection_id"
remove_index :trigger_activations, name: "idx_trigger_activations_automation_id"
remove_index :trigger_activations, name: "idx_trigger_activations_connection_id"
remove_index :contacts, name: "lastContact_idx"
remove_index :contacts, name: "name_idx"
remove_index :contacts, name: "userId_idx"
remove_index :tags, name: "userId_tags_idx"
remove_index :chunk, name: "chunk_compressed_chunk_id_idx"
remove_index :chunk_constraint, name: "chunk_constraint_dimension_slice_id_idx"
remove_index :chunk, name: "chunk_hypertable_id_creation_time_idx"
remove_index :chunk, name: "chunk_hypertable_id_idx"
remove_index :chunk_index, name: "chunk_index_hypertable_id_hypertable_index_name_idx"
remove_index :chunk, name: "chunk_osm_chunk_idx"
remove_index :compression_chunk_size, name: "compression_chunk_size_idx"
remove_index :continuous_agg, name: "continuous_agg_raw_hypertable_id_idx"
remove_index :continuous_aggs_hypertable_invalidation_log, name: "continuous_aggs_hypertable_invalidation_log_idx"
remove_index :continuous_aggs_materialization_invalidation_log, name: "continuous_aggs_materialization_invalidation_log_idx"
remove_index :contact_pipeline_attendant, name: "idx_contact_pipeline_attendant_latest"
remove_index :contact_pipeline_checklist, name: "idx_contact_pipeline_checklist_attendant"
remove_index :contact_pipeline_checklist, name: "idx_contact_pipeline_checklist_column_task"
remove_index :contact_pipeline_checklist, name: "idx_contact_pipeline_checklist_connectionId"
remove_index :custom_field_values, name: "idx_custom_field_values_contact"
remove_index :items_erased, name: "idx_items_erased_finishedAt"
Relation Size
__drizzle_migrations drizzle 56 KB
bgw_job _timescaledb_config 48 KB
compression_algorithm _timescaledb_catalog 48 KB
metadata _timescaledb_catalog 48 KB
bgw_job_stat _timescaledb_internal 40 KB
__drizzle_migrations_pkey drizzle 16 KB
attendant_connection_idx UNUSED 16 KB
bgw_job_pkey _timescaledb_config 16 KB
bgw_job_proc_hypertable_id_idx _timescaledb_config UNUSED 16 KB
bgw_job_stat_history _timescaledb_internal 16 KB
bgw_job_stat_history_job_id_idx _timescaledb_internal UNUSED 16 KB
bgw_job_stat_history_pkey _timescaledb_internal 16 KB
bgw_job_stat_pkey _timescaledb_internal 16 KB
column_task 16 KB
column_task_pkey 16 KB
compression_algorithm_pkey _timescaledb_catalog 16 KB
connectionId_tags_idx 16 KB
connection_attendant_idx UNUSED 16 KB
connection_createdAt_idx 16 KB
connection_lastContact_idx UNUSED 16 KB
connection_lastMessage_idx UNUSED 16 KB
connection_unread_idx UNUSED 16 KB
contact_inactive_idx UNUSED 16 KB
contact_pipelines 16 KB
contact_pipelines_pkey 16 KB
contact_tags_pkey 16 KB
contact_tags_tag_contact_idx 16 KB
contacts 16 KB
contacts_pkey 16 KB
custom_field_connections_pkey 16 KB
custom_field_values 16 KB
custom_field_values_pkey 16 KB
custom_fields 16 KB
custom_fields_pkey 16 KB
folderId_tags_idx UNUSED 16 KB
idx_cf_connections_connection_id 16 KB
idx_cf_connections_custom_field_id UNUSED 16 KB
idx_column_task_columnId 16 KB
idx_column_task_connectionId UNUSED 16 KB
idx_column_task_pipelineId UNUSED 16 KB
idx_contact_pipelines_attributedIn UNUSED 16 KB
idx_contact_pipelines_columnId UNUSED 16 KB
idx_contact_pipelines_contactId 16 KB
idx_contact_pipelines_userId UNUSED 16 KB
idx_contacts_connection_id_id 16 KB
idx_cp_column_list 16 KB
idx_cp_connection_contact 16 KB
idx_cp_connection_created 16 KB
idx_crm_dashboard_queries 16 KB
idx_custom_field_values_business 16 KB
idx_custom_field_values_field 16 KB
idx_custom_fields_category 16 KB
idx_custom_fields_connection_id UNUSED 16 KB
idx_trigger_activations_automation_id UNUSED 16 KB
idx_trigger_activations_connection_id UNUSED 16 KB
idx_trigger_activations_contact_id 16 KB
instaId_connectionId_unique_idx 16 KB
lastContact_idx UNUSED 16 KB
livechat_optimized_idx 16 KB
metadata_pkey _timescaledb_catalog 16 KB
name_idx UNUSED 16 KB
phoneNumber_connectionId_unique_idx 16 KB
tags 16 KB
tags_pkey 16 KB
trigger_activations 16 KB
trigger_activations_pkey 16 KB
uniq_contact_pipeline_business_open 16 KB
uniq_contact_tag 16 KB
unique_cf_connections_field_connection 16 KB
unique_custom_field_name_category_connection 16 KB
userId_idx UNUSED 16 KB
userId_tags_idx UNUSED 16 KB
bgw_policy_chunk_stats_job_id_chunk_id_key _timescaledb_internal 8 KB
capi_connections 8 KB
capi_connections_pkey 8 KB
chunk_column_stats_ht_id_chunk_id_colname_key _timescaledb_catalog 8 KB
chunk_column_stats_pkey _timescaledb_catalog 8 KB
chunk_compressed_chunk_id_idx _timescaledb_catalog UNUSED 8 KB
chunk_constraint_chunk_id_constraint_name_key _timescaledb_catalog 8 KB
chunk_constraint_dimension_slice_id_idx _timescaledb_catalog UNUSED 8 KB
chunk_hypertable_id_creation_time_idx _timescaledb_catalog UNUSED 8 KB
chunk_hypertable_id_idx _timescaledb_catalog UNUSED 8 KB
chunk_index_chunk_id_index_name_key _timescaledb_catalog 8 KB
chunk_index_hypertable_id_hypertable_index_name_idx _timescaledb_catalog UNUSED 8 KB
chunk_osm_chunk_idx _timescaledb_catalog UNUSED 8 KB
chunk_pkey _timescaledb_catalog 8 KB
chunk_schema_name_table_name_key _timescaledb_catalog 8 KB
compression_chunk_size_idx _timescaledb_catalog UNUSED 8 KB
compression_chunk_size_pkey _timescaledb_catalog 8 KB
compression_settings _timescaledb_catalog 8 KB
compression_settings_pkey _timescaledb_catalog 8 KB
contact_pipeline_attendant_pkey 8 KB
contact_pipeline_checklist_pkey 8 KB
contact_pipeline_product_pkey 8 KB
contact_tags 8 KB
continuous_agg_migrate_plan _timescaledb_catalog 8 KB
continuous_agg_migrate_plan_pkey _timescaledb_catalog 8 KB
continuous_agg_migrate_plan_step _timescaledb_catalog 8 KB
continuous_agg_migrate_plan_step_pkey _timescaledb_catalog 8 KB
continuous_agg_partial_view_schema_partial_view_name_key _timescaledb_catalog 8 KB
continuous_agg_pkey _timescaledb_catalog 8 KB
continuous_agg_raw_hypertable_id_idx _timescaledb_catalog UNUSED 8 KB
continuous_agg_user_view_schema_user_view_name_key _timescaledb_catalog 8 KB
continuous_aggs_bucket_function _timescaledb_catalog 8 KB
continuous_aggs_bucket_function_pkey _timescaledb_catalog 8 KB
continuous_aggs_hypertable_invalidation_log_idx _timescaledb_catalog UNUSED 8 KB
continuous_aggs_invalidation_threshold_pkey _timescaledb_catalog 8 KB
continuous_aggs_materialization_invalidation_log_idx _timescaledb_catalog UNUSED 8 KB
continuous_aggs_watermark_pkey _timescaledb_catalog 8 KB
custom_field_connections 8 KB
dimension_hypertable_id_column_name_key _timescaledb_catalog 8 KB
dimension_pkey _timescaledb_catalog 8 KB
dimension_slice_dimension_id_range_start_range_end_key _timescaledb_catalog 8 KB
dimension_slice_pkey _timescaledb_catalog 8 KB
google_connections 8 KB
google_connections_pkey 8 KB
hypertable_associated_schema_name_associated_table_prefix_key _timescaledb_catalog 8 KB
hypertable_pkey _timescaledb_catalog 8 KB
hypertable_table_name_schema_name_key _timescaledb_catalog 8 KB
idx_contact_pipeline_attendant_latest UNUSED 8 KB
idx_contact_pipeline_checklist_attendant UNUSED 8 KB
idx_contact_pipeline_checklist_column_task UNUSED 8 KB
idx_contact_pipeline_checklist_connectionId UNUSED 8 KB
idx_contact_pipeline_product_contact_pipeline_id 8 KB
idx_contact_pipeline_product_crm 8 KB
idx_contacts_automation_resume 8 KB
idx_custom_field_values_contact UNUSED 8 KB
idx_evaluations_connection_id_attendant_id 8 KB
idx_items_erased_finishedAt UNUSED 8 KB
idx_items_erased_status_type 8 KB
idx_items_erased_type 8 KB
items_erased 8 KB
items_erased_pkey 8 KB
ligue_lead_campaigns 8 KB
ligue_lead_campaigns_pkey 8 KB
service_evaluations 8 KB
service_evaluations_pkey 8 KB
tablespace_hypertable_id_tablespace_name_key _timescaledb_catalog 8 KB
tablespace_pkey _timescaledb_catalog 8 KB
telemetry_event _timescaledb_catalog 8 KB
unanswered_attendants 8 KB
unanswered_leads 8 KB
uniq_contact_pipeline_attendant 8 KB
uniq_contact_pipeline_checklist 8 KB
bgw_policy_chunk_stats _timescaledb_internal 0 Bytes
cache_inval_bgw_job _timescaledb_cache 0 Bytes
cache_inval_extension _timescaledb_cache 0 Bytes
cache_inval_hypertable _timescaledb_cache 0 Bytes
chunk _timescaledb_catalog 0 Bytes
chunk_column_stats _timescaledb_catalog 0 Bytes
chunk_constraint _timescaledb_catalog 0 Bytes
chunk_index _timescaledb_catalog 0 Bytes
compression_chunk_size _timescaledb_catalog 0 Bytes
contact_pipeline_attendant 0 Bytes
contact_pipeline_checklist 0 Bytes
contact_pipeline_product 0 Bytes
continuous_agg _timescaledb_catalog 0 Bytes
continuous_aggs_hypertable_invalidation_log _timescaledb_catalog 0 Bytes
continuous_aggs_invalidation_threshold _timescaledb_catalog 0 Bytes
continuous_aggs_materialization_invalidation_log _timescaledb_catalog 0 Bytes
continuous_aggs_watermark _timescaledb_catalog 0 Bytes
dimension _timescaledb_catalog 0 Bytes
dimension_slice _timescaledb_catalog 0 Bytes
hypertable _timescaledb_catalog 0 Bytes
tablespace _timescaledb_catalog 0 Bytes