Group
  • Database

    Find and fix database storage bloat

    Identifies the tables eating disk (logs, dead rows, oversized payloads) and reclaims space with cleanup and maintenance.

    • Debug & fix
    • Automate workflows
    • Intermediate
    • General

Free Prompt

Audit my database storage usage and reclaim wasted space. Start by ranking tables or collections by size; the answer is almost always surprising. Investigate the usual sources: log and event tables that were never meant to live forever (route them into the retention cleanup jobs if they're not already); dead rows and index bloat from heavy update/delete churn (Postgres needs vacuum analysis; other databases have their equivalents); oversized payloads stored inline (base64 files in text columns, huge JSON blobs) that belong in object storage with a reference; and indexes that nothing uses, which cost both writes and disk. For each finding, apply the fix: purge, archive, move to storage, drop the unused index, or run the database's maintenance routine. Check before deleting anything: report what you found and how old it is. Don't run heavy maintenance (vacuum full, index rebuilds) during traffic; schedule it. Don't drop an index without confirming no query uses it. Deliver: the size ranking before and after, each finding with the fix applied, and the ongoing maintenance schedule so bloat doesn't quietly rebuild.

What This Does / How This Helps

Ranks your tables by size, finds what's actually eating the disk, and reclaims it, then schedules the maintenance that keeps it from coming back. Storage bloat is a slow tax: bigger backups, slower restores, slower queries over fat tables, and a disk bill that climbs every month. The cause is usually boring: a logs table nobody capped, dead rows the database never reclaimed, or files stored as base64 in a text column. The before-and-after ranking makes the win visible, and the maintenance schedule is the part that keeps next year from looking like this year.

Want to skip doing this by hand?

Fortivibe audits your app for all of the areas these prompts cover (and more).

See What We Check

Related Prompts