fachinformatiker-wiki

it's easy when it's here

User Tools

Site Tools


datenbanken:mysql

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
datenbanken:mysql [2024/07/03 14:49] – [Befehle] gsysdatenbanken:mysql [2025/03/03 15:04] (current) – [Befehle] gsys
Line 48: Line 48:
 </code> </code>
  
 +** Get Tables Sizes from all DBs **
 +<code mysql>
 +SELECT
 +  TABLE_NAME AS `Table`,
 +  ROUND((DATA_LENGTH + INDEX_LENGTH) / 1024 / 1024) AS `Size (MB)`
 +FROM
 +  information_schema.TABLES
 +WHERE
 +  TABLE_SCHEMA = "$DB_NAME"
 +ORDER BY
 +  (DATA_LENGTH + INDEX_LENGTH)
 +DESC;
 +</code>
  
datenbanken/mysql.1720010960.txt.gz · Last modified: by gsys