public function OptimizeTables()
	{
		if ($this->ConnectionSetting->IsReadOnlySlave)
			throw new Exception('Optimizing tables is allowed on a read-only slave');
		
		$results = array();
		$table_names = $this->_driver->GetTableNames($this->_dbconn,$this->GetDBName());
		
		foreach ($table_names as $table_name)
		{
			$results[$table_name] = $this->_driver->Optimize($this->_dbconn,$table_name);
		}
		
		return $results;
		
	}
public function OptimizeTables()
	{
		if ($this->ConnectionSetting->IsReadOnlySlave)
			throw new Exception('Optimizing tables is allowed on a read-only slave');
		
		$results = array();
		$table_names = $this->_driver->GetTableNames($this->_dbconn,$this->GetDBName());
		
		foreach ($table_names as $table_name)
		{
			$results[$table_name] = $this->_driver->Optimize($this->_dbconn,$table_name);
		}
		
		return $results;
		
	}
public function OptimizeTables ( ) { if ( $ this -> ConnectionSetting -> IsReadOnlySlave ) throw new Exception ( 'Optimizing tables is allowed on a read-only slave' ) ; $ results = array ( ) ; $ table_names = $ this -> _driver -> GetTableNames ( $ this -> _dbconn , $ this -> GetDBName ( ) ) ; foreach ( $ table_names as $ table_name ) { $ results [ $ table_name ] = $ this -> _driver -> Optimize ( $ this -> _dbconn , $ table_name ) ; } return $ results ; }
Runs OPTIMIZE TABLE on all tables in the current database
@return array results for each table
Runs OPTIMIZE TABLE on all tables in the current database