0

I have a write heavy application. Approx 5lac+ inserts per day in a MySQL table. I have master <> master -> slave. Performance is not an issue here.

I need your inputs with regards to management of the data. After a certain ammount of time I'd see the table becomes bulky and I would like to discard old records; though I'd be needing them later. I want to discuss the best way to keep this data.

Partitioning on monthly basis is the one way I can think of.

Zapto
  • 1,824
  • 6
  • 23
  • 39
my_sql
  • 1

1 Answers1

1

You need to implement some type of archiving. This can be done in several ways:

  1. Your application can insert in two tables instead of one (active + archive). When you need to remove some data from the active table, you will be fine as you have another copy.
  2. You can implement some type of DB triggers on delete from the active table. The trigger will insert the deleted records in the archive table.
  3. You can use DB partitioning.
Khaled
  • 36,533
  • 8
  • 72
  • 99