mysql_Optimize 허접 팁~! ㅋㅋㅋ

$result = mysql_query($sql);
$num = mysql_affected_rows();
// echo " $sql -> $num
";
$o = 1;

for($d = 0 ; $d < $num; $d++){
$row_d = mysql_fetch_row($result);
// echo "$row_d[0]
";

$sql2 = " show tables from $row_d[0] ";
$result2 = mysql_query($sql2);
$num2 = mysql_affected_rows();

for($i =1 ; $i <= $num2 ; $i++){
$row = mysql_fetch_row($result2);
$no = sprintf("%03d",$o);
$o_sql = " OPTIMIZE TABLE $row_d[0].$row[0] ";
// echo "$o_sql
";

$o_result = mysql_query($o_sql);
$o_row = mysql_fetch_row($o_result);
//echo "$no   |   $o_sql => $o_row[0] ,
$o_row[1] , $o_row[2] , $o_row[3]
";
echo "$no   |      $o_row[0] ,
$o_row[1] , $o_row[2] , $o_row[3]
";
$o++;
}

}


?>
크리에이티브 커먼즈 라이센스
Creative Commons License
이올린에 북마크하기

Posted by 홍반장

2004/09/11 09:17 2004/09/11 09:17
Response
No Trackback , No Comment
RSS :
http://tcbs17.cafe24.com/tc/rss/response/54

Trackback URL : http://tcbs17.cafe24.com/tc/trackback/54

« Previous : 1 : ... 5744 : 5745 : 5746 : 5747 : 5748 : 5749 : 5750 : 5751 : 5752 : ... 6391 : Next »

블로그 이미지

- 홍반장

Archives

Recent Trackbacks

Calendar

«   2024/05   »
      1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31  
Statistics Graph

Site Stats

Total hits:
185330
Today:
333
Yesterday:
328