Database Tables Print

  • database, tables
  • 0

Medusa Panel › Settings › Database Tables

The Database Tables screen in the Medusa Streaming Engine is a read-only inspector for the tables of the active engine database. It shows how much storage each table uses and lets you run an OPTIMIZE on the tables that support it. Open it from the sidebar under Settings › Database Tables (/database/tables).

This screen reports on the live database and does not change any data. It is useful for seeing which tables are largest and for reclaiming free space after large deletions. If the database is unavailable, the screen shows an error in place of the list.

The table list

Tables are listed largest first (by data plus index size). Each row shows:

  • Table — the table name, for example stream_connections.
  • Engine — the storage engine, typically InnoDB or MyISAM.
  • Estimated Rows — the approximate row count. For InnoDB tables this value is an estimate from the database, not an exact count.
  • Data Size — space used by the row data, shown in readable units such as 49 B, 8.8 kB or 127 MB.
  • Index Size — space used by the indexes.
  • Free Space — allocated-but-unused space that an optimize can often reclaim.
  • Total Size — data plus index size, the figure used to order the list.

You can search and sort by column to focus on a particular table.

Optimizing a table

The Actions column offers an Optimize action for each table whose engine supports it, that is InnoDB and MyISAM tables. Optimizing runs OPTIMIZE TABLE on that one table to defragment it and reclaim free space; on success the engine reports that the table was optimized.

Tables on any other engine do not offer the action, and attempting one reports that the engine cannot be optimized here. Only one optimize runs at a time — if another is already in progress, the engine asks you to wait.

An optimize may rebuild a table and can lock it for the duration. Run it during low traffic, and make sure the database disk has enough free space for the rebuild before you start.
Look at the Free Space column first: a table with little free space has little to gain from an optimize, while a large table that has had many rows deleted is the best candidate.

Related


Was this answer helpful?

« Back