Skip to content

Innodb fragmented plugin #4

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Innodb fragmented plugin #4

wants to merge 3 commits into from

Conversation

lefred
Copy link
Collaborator

@lefred lefred commented Jun 26, 2019

No description provided.

CONCAT(round(data_free/(data_length+index_length)*100,2),'%'),
'100%'),')') AS data_free_pct
FROM information_schema.TABLES WHERE (data_free/(data_length+index_length)*100) > {limit}
AND table_schema <> 'mysql';""".format(limit=percent)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add AND ENGINE="INNODB" :)

CONCAT(ROUND(index_length / ( 1024 * 1024 * 1024 ), 2), 'G') IDX,
CONCAT(ROUND(( data_length + index_length ) / ( 1024 * 1024 * 1024 ), 2), 'G') 'TOTAL SIZE',
ROUND(index_length / data_length, 2) IDXFRAC,
CONCAT(ROUND(( data_free / 1024 / 1024),2), 'MB') AS data_free,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consistent column names would be nice

TABLE
TOTAL SIZE <- spaces
data_free <- lower case and underscore

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Selection_808

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

multo bene

Signed-off-by: Frederic Descamps <[email protected]>
Copy link
Collaborator

@grypyrg grypyrg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:shipit:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants