Sample Header Ad - 728x90

Is it possible to compress or parition existing huge table in place for mariadb?

-1 votes
2 answers
137 views
I have a mariadb database set up for logging experiment data. In one of the tables, I store huge raw images every row. With a few million rows each containing 3 512*512px images, I run out of disk space. I have 12TB disk and the database has consumed ~10TB. The difference between images is small, so I believe there is a lot of room for compression. I want to consider compression the database, but with limited free space I want a method to compress it in place. I use mariadb 10.3.39 on Ubuntu 20.04. I am not an expert on database, but I am happy to learn more. I tried: ALTER TABLE images ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=8 ALGORITHM=INPLACE; and I got: ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'ALGORITHM=INPLACE' at line 1 I also considered maybe I can partition my table into chunks, and comrpress each partition individually. However I am also not sure if partitioning existing table requires more space. I would like to get some recommendation before trying blindly.
Asked by hz lin (1 rep)
Oct 19, 2024, 03:18 PM
Last activity: Oct 19, 2024, 09:14 PM