Update mysqltuner.pl
This commit is contained in:
parent
68e5902169
commit
ac34523609
1 changed files with 10 additions and 1 deletions
|
@ -91,6 +91,8 @@ my %opt = (
|
||||||
"server-log" => '',
|
"server-log" => '',
|
||||||
"tbstat" => 0,
|
"tbstat" => 0,
|
||||||
"notbstat" => 0,
|
"notbstat" => 0,
|
||||||
|
"colstat" => 0,
|
||||||
|
"nocolstat" => 0,
|
||||||
"idxstat" => 0,
|
"idxstat" => 0,
|
||||||
"noidxstat" => 0,
|
"noidxstat" => 0,
|
||||||
"sysstat" => 0,
|
"sysstat" => 0,
|
||||||
|
@ -131,6 +133,7 @@ GetOptions(
|
||||||
'color', 'noprocess',
|
'color', 'noprocess',
|
||||||
'dbstat', 'nodbstat',
|
'dbstat', 'nodbstat',
|
||||||
'tbstat', 'notbstat',
|
'tbstat', 'notbstat',
|
||||||
|
'colstat', 'nocolstat',
|
||||||
'sysstat', 'nosysstat',
|
'sysstat', 'nosysstat',
|
||||||
'pfstat', 'nopfstat',
|
'pfstat', 'nopfstat',
|
||||||
'idxstat', 'noidxstat',
|
'idxstat', 'noidxstat',
|
||||||
|
@ -196,6 +199,7 @@ if ( $opt{verbose} ) {
|
||||||
}
|
}
|
||||||
$opt{nocolor} = 1 if defined( $opt{outputfile} );
|
$opt{nocolor} = 1 if defined( $opt{outputfile} );
|
||||||
$opt{tbstat} = 0 if ( $opt{notbstat} == 1 ); # Don't Print table information
|
$opt{tbstat} = 0 if ( $opt{notbstat} == 1 ); # Don't Print table information
|
||||||
|
$opt{colstat} = 0 if ( $opt{nocolstat} == 1 ); # Don't Print column information
|
||||||
$opt{dbstat} = 0 if ( $opt{nodbstat} == 1 ); # Don't Print database information
|
$opt{dbstat} = 0 if ( $opt{nodbstat} == 1 ); # Don't Print database information
|
||||||
$opt{noprocess} = 0
|
$opt{noprocess} = 0
|
||||||
if ( $opt{noprocess} == 1 ); # Don't Print process information
|
if ( $opt{noprocess} == 1 ); # Don't Print process information
|
||||||
|
@ -6126,9 +6130,12 @@ sub mysql_tables {
|
||||||
my $current_type =
|
my $current_type =
|
||||||
uc($ctype) . ( $isnull eq 'NO' ? " NOT NULL" : "" );
|
uc($ctype) . ( $isnull eq 'NO' ? " NOT NULL" : "" );
|
||||||
my $optimal_type = '';
|
my $optimal_type = '';
|
||||||
|
|
||||||
|
if ($opt{colstat} == 1) {
|
||||||
$optimal_type = select_str_g( "Optimal_fieldtype",
|
$optimal_type = select_str_g( "Optimal_fieldtype",
|
||||||
"SELECT \\`$_\\` FROM \\`$dbname\\`.\\`$tbname\\` PROCEDURE ANALYSE(1000)"
|
"SELECT \\`$_\\` FROM \\`$dbname\\`.\\`$tbname\\` PROCEDURE ANALYSE(100000)"
|
||||||
) unless ( mysql_version_ge(8) and not mysql_version_eq(10) );
|
) unless ( mysql_version_ge(8) and not mysql_version_eq(10) );
|
||||||
|
}
|
||||||
if ( $optimal_type eq '' ) {
|
if ( $optimal_type eq '' ) {
|
||||||
infoprint " Current Fieldtype: $current_type";
|
infoprint " Current Fieldtype: $current_type";
|
||||||
|
|
||||||
|
@ -6527,6 +6534,8 @@ You must provide the remote server's total memory when connecting to other serve
|
||||||
--nodbstat Don't Print database information
|
--nodbstat Don't Print database information
|
||||||
--tbstat Print table information
|
--tbstat Print table information
|
||||||
--notbstat Don't Print table information
|
--notbstat Don't Print table information
|
||||||
|
--colstat Print column information
|
||||||
|
--nocolstat Don't Print column information
|
||||||
--idxstat Print index information
|
--idxstat Print index information
|
||||||
--noidxstat Don't Print index information
|
--noidxstat Don't Print index information
|
||||||
--sysstat Print system information
|
--sysstat Print system information
|
||||||
|
|
Loading…
Reference in a new issue