I have a database table where a have a varchar(200) column.
This is a table with historical log information where about 99.9% of the rows in the table contains the same text message as another row in the table.
The size of that database and speed when searching is becoming a problem.
So I was thinking that I could move the varchar values to another table with unique text values and then have a reference to that table for every row in the first table, but before I change this, I would like to know if there is an easier way to do this?
For instance setting some property on my existing table column that would cause this behavior automatically. So that the database automatically maintains a table with unique texts. I realize that this would of cause have a big performance impact on delete operation but that is almost never done anyway.
Also I would really like to avoid changing the program that inserts into the log table.
I have been using MySQL but if another DB can do this it is also an option to change the database another one. (MariaDB or other?)
Thanks