PHPackages                             monogo/optimizedatabase - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Database &amp; ORM](/categories/database)
4. /
5. monogo/optimizedatabase

ActiveMagento2-module[Database &amp; ORM](/categories/database)

monogo/optimizedatabase
=======================

Magento 2 module for optimization of database fragmentation.

2.0.1(5y ago)312.4kMITPHPPHP ~7.3.0||~7.4.0

Since Feb 26Pushed 5y ago2 watchersCompare

[ Source](https://github.com/MonogoPolska/monogo-m2-optimize-database)[ Packagist](https://packagist.org/packages/monogo/optimizedatabase)[ Docs](https://github.com/MonogoPolska/m2-optimize-database)[ RSS](/packages/monogo-optimizedatabase/feed)WikiDiscussions master Synced 2mo ago

READMEChangelogDependencies (4)Versions (8)Used By (0)

#### Magento 2 module for optimization of database fragmentation.

[](#magento-2-module-for-optimization-of-database-fragmentation)

**Install**
===========

[](#install)

### Git

[](#git)

- Locate the **/app/code** directory which should be under the magento root installation.
- If the **code** folder is not there, create it.
- Create a folder **Monogo** inside the **code** folder.
- Change to the **Monogo** folder and clone the Git repository () into **Monogo** specifying the local repository folder to be **OptimizeDatabase**e.g.

` git clone https://github.com/MonogoPolska/monogo-m2-optimize-database.git OptimizeDatabase`

### Composer

[](#composer)

`composer require monogo/optimizedatabase`

### Magento Setup

[](#magento-setup)

- Run Magento commands

`php bin/magento setup:upgrade`

`php bin/magento setup:di:compile`

`php bin/magento setup:static-content:deploy`

**App Configuration Options**
=============================

[](#app-configuration-options)

Go to Stores-&gt;Configuration-&gt;Monogo-&gt;Optimize database

- Enable module **Default value is 1 (Yes)**
- Minimal fragmentation ratio - Optimize tables for which fragmentation ratio is higher than this value. **Default value is 1**
- Use Magento Cron - You can disable Magento cron and run Optimization from shell **Default value is 0 (No)**
- Cron schedule - Use Crontab Format (Eg. "05 1 \* \* \*" every day at 01:05)

### Default values:

[](#default-values)

**Shell**
=========

[](#shell)

```
Usage:  php bin/magento monogo:optimize:database [--mode MODE]

     print                             Print all tables
     optimize                          Optimize tables
     help                              This help

```

for example:

`php bin/magento monogo:optimize:database --mode print`

Possible output:

```
Module is disabled in Stores->Configuration->Monogo->Optimize database

```

###  Health Score

32

—

LowBetter than 72% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity22

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity65

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~103 days

Total

6

Last Release

2116d ago

Major Versions

1.0.4 → 2.0.12020-07-29

PHP version history (3 changes)1.0.0PHP ~5.6.0|~7.0.0|~7.1.0|~7.2.0

1.0.4PHP ~7.2.0|~7.3.0

2.0.1PHP ~7.3.0||~7.4.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/87059637e00638d5d5d08d8e94ef97b3168cd0b4bfde4e512ed77cef38106ae5?d=identicon)[Monogo](/maintainers/Monogo)

---

Top Contributors

[![pawel-detka](https://avatars.githubusercontent.com/u/17678684?v=4)](https://github.com/pawel-detka "pawel-detka (12 commits)")

### Embed Badge

![Health badge](/badges/monogo-optimizedatabase/health.svg)

```
[![Health](https://phpackages.com/badges/monogo-optimizedatabase/health.svg)](https://phpackages.com/packages/monogo-optimizedatabase)
```

###  Alternatives

[robmorgan/phinx

Phinx makes it ridiculously easy to manage the database migrations for your PHP app.

4.5k46.2M405](/packages/robmorgan-phinx)[kimai/kimai

Kimai - Time Tracking

4.6k7.4k1](/packages/kimai-kimai)[rector/rector-src

Instant Upgrade and Automated Refactoring of any PHP code

134391.5k12](/packages/rector-rector-src)[webfactory/slimdump

slimdump is a little tool to help you creating dumps of large MySQL-databases.

188124.8k1](/packages/webfactory-slimdump)[guikingone/scheduler-bundle

A Symfony bundle that allows to schedule and create repetitive tasks

114217.4k](/packages/guikingone-scheduler-bundle)[worksome/foggy

Foggy is a tool for making database dumps with some data removed/changed.

26571.7k1](/packages/worksome-foggy)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
