Commit graph

5 commits

Author SHA1 Message Date
provokateurin
dd8b4fb384
style(PHP): Fix
Signed-off-by: provokateurin <kate@provokateurin.de>
2026-06-11 20:01:52 +02:00
Ferdinand Thiessen
9bc22fd2c4
chore: apply code style
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
2026-06-11 17:19:41 +02:00
Louis Chmn
9f6984d0a1 fix(DB): Improve wording about unused indexes
Signed-off-by: Louis Chmn <louis@chmn.me>
2026-06-11 16:46:23 +02:00
Louis Chmn
1c48481217 fix: Psalm errors from #60840
Signed-off-by: Louis Chmn <louis@chmn.me>
2026-06-11 15:07:54 +02:00
Rodrigo Correia
729e1e6920 feat(db): add occ db:info, db:size, db:index-usage and db:locks
Implements RFC #59422. Adds four read-only diagnostic commands to
the occ CLI for administrators to inspect database health without
needing external tools:

- db:info: shows engine version and key config variables with
  health check against recommended values
- db:size: lists all tables ordered by total disk usage
- db:index-usage: reports unused indexes via performance_schema
  (MySQL) or pg_stat_user_indexes (PostgreSQL)
- db:locks: detects active blocking transactions and deadlocks

All commands support MySQL/MariaDB and PostgreSQL. A --json flag
is available for automated parsing. Includes 31 unit tests.

Closes #59422
Signed-off-by: Rodrigo Correia <rodrigo.mendes.correia@tecnico.ulisboa.pt>
Signed-off-by: Carolina Quinteiro <carolinafquinteiro@tecnico.ulisboa.pt>
Co-authored-by: Carolina Quinteiro <carolinafquinteiro@tecnico.ulisboa.pt>
2026-05-27 13:37:40 +01:00