1

I have a database instance (MySQL 8) on Google Cloud and since 20 days ago, the instance's storage usage just keeps increasing (approx 2Gb every single day!). But I couldn't find out why.

What I have done:

  1. Take a look at Point-in-time recovery "Point-in-time recovery" option, it's already disabled.
  2. Binary logs is not enabled.
  3. Check the actual database size and I see my database is just only 10GB in size
  4. No innodb_per_table flag, so it must be "false" by default

The actual database size is 10GB, now the storage usage takes up to 220GB! That's a lot of money!

I couldn't resolve this issue, please give me some ideal tips. Thank you!

1
  • You have asked this question twice previously. You received comments requesting additional information but you did not respond or update your question. Review those comments and update your question with details to enable an answer. stackexchange.com/… Commented Dec 5, 2021 at 16:39

1 Answer 1

1

SQL databases get increased from multiple reasosns. It might be from unbalanced indexes and many more.

I would gamble on excessive update or even delete calls. Check if vacuum works for you (there are multiple types of vacuum - analyze, analyze full. Google it)

If it helps it means that something in the application is causing it, either it can be avoided or online periodic vacuum (or offline vaccum full with down time)

Apparently on mysql vacuum is called optimize https://dev.mysql.com/doc/refman/8.0/en/optimize-table.html

2
  • The size growth happens on the instance, not in the database itself.. idk if the real problem is the database optimize Commented Dec 6, 2021 at 2:27
  • well - you can try it :) AFAIK disk size of a database is, well, caused by the database... Commented Dec 6, 2021 at 8:10

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.