Skip to content

Instantly share code, notes, and snippets.

@nelaaro
Last active September 29, 2017 11:51
Show Gist options
  • Save nelaaro/b07aca58393530900304e9adec315e11 to your computer and use it in GitHub Desktop.
Save nelaaro/b07aca58393530900304e9adec315e11 to your computer and use it in GitHub Desktop.
show the tokudb compression per table and tokudb file created for table.
mysql -sNe 'SELECT dictionary_name, internal_file_name, table_name, " " FROM information_schema.tokudb_file_map WHERE table_dictionary_name = "main" OR table_dictionary_name LIKE "key-%"' | perl -F'\t' -ane '@out=qx(tokuftdump --nodata --header --rootnode /srv/mysql/data/$F[1]); foreach $ftdump (@out) { if($ftdump=~/^ compression_method=([0-9]+)$/) { print $F[2]."\t".$F[0]."\t".$1."\n"; last } }'
# https://dba.stackexchange.com/questions/164879/tokudb-row-format-is-not-being-accepted/164887#164887
@nelaaro
Copy link
Author

nelaaro commented Sep 29, 2017

Need to script this nicely.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment