PgHero
No long running queries
Connections healthy 77
Vacuuming healthy
No columns near integer overflow
No invalid indexes or constraints
3 duplicate indexes
No suggested indexes
No slow queries

Duplicate Indexes

These indexes exist, but aren’t needed. Remove them for faster writes.

rails generate migration remove_unneeded_indexes

And paste

remove_index :services, name: "services_space_id", column: :space_id
remove_index :ticket_history, name: "ticket_history_space_id", column: :space_id
remove_index :ticket_stats, name: "ticket_stats_space_id_tr_idx", column: [:space_id, :tr]
Details
On services
services_space_id (space_id)
is covered by
services_space_id_entity_id_unique (space_id, entity_id)
On ticket_history
ticket_history_space_id (space_id)
is covered by
ticket_history_space_id_branch_session_id_service_id_serial_idx (space_id, branch_session_id, service_id, serial DESC)
On ticket_stats
ticket_stats_space_id_tr_idx (space_id, tr)
is covered by
ticket_stats_keys_index (space_id, tr, keys)