0)
{
echo "\n";
if (!empty($strIndexes)) echo $strIndexes.":\n";
?>
>
|
|
|
|
";
if($row["Key_name"] == "PRIMARY")
{
$sql_query = urlencode("ALTER TABLE ".$table." DROP PRIMARY KEY");
$zero_rows = urlencode($strPrimaryKey." ".$strHasBeenDropped);
}
else
{
$sql_query = urlencode("ALTER TABLE ".$table." DROP INDEX ".$row["Key_name"]);
$zero_rows = urlencode($strIndex." ".$row["Key_name"]." ".$strHasBeenDropped);
}
?>
|
|
|
$strDrop";?> |
";
}
print " \n";
print show_docu("manual_Performance.html#MySQL_indexes");
echo " | \n";
}
// BEGIN - Calc Table Space - staybyte - 9 June 2001
if (MYSQL_MAJOR_VERSION == "3.23" && intval(MYSQL_MINOR_VERSION)>3 && $tbl_type!="INNODB" && isset($showtable)){
if ($indexcount>0) echo " | \n";
echo "\n";
if (!empty($strSpaceUsage)) echo $strSpaceUsage.":\n";
echo "\n";
echo "$strType | ";
echo "";
if (!empty($strUsage)) echo $strUsage;
echo " | ";
// Data
echo "\n";
list($size,$unit)=format_byte_down($showtable["Data_length"]);
echo "";
if (!empty($strData)) echo $strData;
echo " | ".$size." | ".$unit." | ";
echo " \n";
// Index
echo "\n";
list($size,$unit)=format_byte_down($showtable["Index_length"]);
echo "$strIndex | ".$size." | ".$unit." | ";
echo " \n";
// Overhead
if (isset($showtable["Data_free"]) && $showtable["Data_free"]!=0){
echo "\n";
list($size,$unit)=format_byte_down($showtable["Data_free"]);
echo "";
if (!empty($strOverhead)) echo $strOverhead;
echo " | ".$size." | ".$unit." | ";
echo " \n";
// Effective
echo "\n";
list($size,$unit)=format_byte_down($showtable["Data_length"]+$showtable["Index_length"]-$showtable["Data_free"]);
echo "";
if (!empty($strOverhead)) echo $strEffective;
echo " | ".$size." | ".$unit." | ";
echo " \n";
}
// Total
echo "\n";
list($size,$unit)=format_byte_down($showtable["Data_length"]+$showtable["Index_length"]);
echo "$strTotal | ".$size." | ".$unit." | ";
echo " \n";
if (!empty($showtable["Data_free"])){
echo "";
echo "";
$query = "server=$server&lang=$lang&db=$db&table=$table&goto=tbl_properties.php3";
echo "[$strOptimizeTable]";
echo " | ";
echo " \n";
}
echo " \n";
echo " | \n";
// Rows Statistic
echo " | \n";
echo "\n";
if (!empty($strRowsStatistic)) echo $strRowsStatistic.":\n";
echo "\n";
echo "";
if (!empty($strStatement)) echo $strStatement;
echo " | ";
echo "";
if (!empty($strValue)) echo $strValue;
echo " | \n";
$i=0;
if (isset($showtable["Row_format"])){
echo (++$i%2)?"":" | \n";
if (!empty($strFormat)) echo $strFormat;
echo " | ";
if ($showtable["Row_format"]=="Fixed" && !empty($strFixed)) echo $strFixed;
else if ($showtable["Row_format"]=="Dynamic" && !empty($strDynamic)) echo $strDynamic;
else echo $showtable["Row_format"];
echo " | \n";
}
if (isset($showtable["Rows"])){
echo (++$i%2)?"":" | \n";
if (!empty($strRows)) echo $strRows;
echo " | ".$showtable["Rows"]." | \n";
}
if (isset($showtable["Avg_row_length"])){
echo (++$i%2)?"":" | \n";
if (!empty($strRowLength)) echo $strRowLength;
echo " ø";
echo " | ".$showtable["Avg_row_length"]." | \n";
}
if (isset($showtable["Auto_increment"])){
echo (++$i%2)?"":" | \n";
echo "$strNext Autoindex";
echo " | ".$showtable["Auto_increment"]." | \n";
}
echo " \n";
}
// END - Calc Table Space
?>
|