Skip to content

A Go program that clean and optimise your DBMS, made to be run everyday as a back-end program.

Notifications You must be signed in to change notification settings

Maxime-Cllt/GoSqlCleaner

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DBCleaner

DBCleaner

Description

DBCleaner is a program made to be run on the backend of a server or an application to clean the database. It will reduce the storage of the database and optimise all tables except system tables. It is a simple and efficient way to keep your database clean and optimised without having to do it manually. It is a great way to keep your database running in the best conditions possible. Using Go language, it is compatible with all platforms and can be run on any server or application.

Features

  • Reduce storage of the database
  • Optimise all tables except system tables
  • Simple and efficient way to keep your database clean
  • Compatible with all platforms
  • Maintain your database in the best conditions possible
  • Don't require any dump or backup
  • Easily run on any server or application
  • Easy to use

Supported Databases

  • MySQL
  • MariaDB
  • PostgreSQL

Platforms & Requirements

MacOS Linux Windows
Golang

Installation

To run the program :

  1. Clone the repository:
git clone https://github.com/Maxime-Cllt/GoSqlCleaner.git
  1. Import the libraries:
go mod tidy
  1. Compile the program:
go build -o GoSqlCleaner
  1. Run the program with the following your database information:

You need to create a file named config.json in the same directory as the program with the following content:

{
  "driver": "mysql", 
  "host": "localhost",
  "port": "3306",
  "username": "root",
  "password": "password",
  "database": "testdb"
}

Then run the program with the following command:

MacOS & Linux

./GoSqlCleaner

Windows

GoSqlCleaner.exe

Notes

  • Time complexity: O(n) where n is the number of tables in the database
  • Don't clean triggers, stored procedures, functions, and views
  • May not reduce much storage but don't cost much time to run and can be run frequently
  • Require some privileges to connect to the database and to perform the cleaning

About

A Go program that clean and optimise your DBMS, made to be run everyday as a back-end program.

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages