From 45b8b3f65bdd3a6394b6fd89f8cf9c6be31fff24 Mon Sep 17 00:00:00 2001 From: depuhitv <152459362+depuhitv@users.noreply.github.com> Date: Mon, 4 Dec 2023 16:18:10 +1100 Subject: [PATCH 1/2] compress sync_media table for mariadb Added steps to compress sync_media table for mariadb. For 1,608 records, I am seeing the size reduced from 642.8 MB to 55.8 MB --- docs/other-database-backends.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/docs/other-database-backends.md b/docs/other-database-backends.md index d0b1d1f..17a104c 100644 --- a/docs/other-database-backends.md +++ b/docs/other-database-backends.md @@ -79,6 +79,13 @@ entry in the container or stdout logs: If you see a line similar to the above and the web interface loads, congratulations, you are now using an external database server for your TubeSync data! +## Database Compression (For MariaDB) +With a lot of media files the `sync_media` table grows in size quickly. +You can save space using column compression while using MariaDB + 1. Stop tubesync + 2. Execute `ALTER TABLE sync_source MODIFY metadata LONGTEXT COMPRESSED;` on database tubesync + 3. Start tunesync and confirm the connection still works. + ## Docker Compose If you're using Docker Compose and simply want to connect to another container with @@ -118,6 +125,7 @@ database before it can be written to. This file should contain: CREATE DATABASE tubesync; ``` + Then it must be mapped to `/docker-entrypoint-initdb.d/init.sql` for it to be executed on first startup of the container. See the `tubesync-db` volume mapping above for how to do this. From 6c9772d573d9aa7000b5b226d3b27d1ea9604816 Mon Sep 17 00:00:00 2001 From: depuhitv Date: Mon, 4 Dec 2023 16:26:46 +1100 Subject: [PATCH 2/2] fixed grammar --- docs/other-database-backends.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/other-database-backends.md b/docs/other-database-backends.md index 17a104c..3ac61e4 100644 --- a/docs/other-database-backends.md +++ b/docs/other-database-backends.md @@ -81,7 +81,8 @@ you are now using an external database server for your TubeSync data! ## Database Compression (For MariaDB) With a lot of media files the `sync_media` table grows in size quickly. -You can save space using column compression while using MariaDB +You can save space using column compression using the following steps while using MariaDB: + 1. Stop tubesync 2. Execute `ALTER TABLE sync_source MODIFY metadata LONGTEXT COMPRESSED;` on database tubesync 3. Start tunesync and confirm the connection still works.