Verfasst: 05.10.2006 21:08
wie ermittelst du die mysql-abfragen mit den größen?
phpBB.de - Die deutsche phpBB-Community
https://www.phpbb.de/community/
Code: Alles auswählen
//
// Base query method
//
function sql_query($query = "", $transaction = FALSE)
{
$mtime = microtime();
$mtime = explode(" ",$mtime);
$mtime = $mtime[1] + $mtime[0];
$starttime = $mtime;
// SQL-Zeitmessung Anfang
$zmtime = microtime();
$zmtime = explode(" ",$zmtime);
$zmstart = $zmtime[1] + $zmtime[0];
$abfrage = $query;
$test = debug_backtrace();
$this->zmfile .= "xYz" . $test[0]['file'];
$this->zmline .= "xYz" . $test[0]['line'];
// SQL-Zeitmessung Ende
// Remove any pre-existing queries
unset($this->query_result);
if($query != "")
{
$this->num_queries++;
$this->query_result = @mysql_query($query, $this->db_connect_id);
}
if($this->query_result)
{
$this->nr .= "xYz" . @mysql_num_rows($this->query_result);
$this->nf .= "xYz" . @mysql_num_fields($this->query_result);
unset($this->row[$this->query_result]);
unset($this->rowset[$this->query_result]);
// SQL-Zeitmessung Anfang
$zmtime = microtime();
$zmtime = explode(" ",$zmtime);
$zmende = $zmtime[1] + $zmtime[0];
$zmtotal = round(($zmende - $zmstart), 5);
$this->zmtotal += $zmtotal;
$this->zmteil .= "xYz" . $zmtotal;
$this->abfrage .= "xYz" . $abfrage;
// SQL-Zeitmessung Ende
$mtime = microtime();
$mtime = explode(" ",$mtime);
$mtime = $mtime[1] + $mtime[0];
$endtime = $mtime;
$this->sql_time += $endtime - $starttime;
return $this->query_result;
}
else
{
$this->nr .= "xYz" . @mysql_num_rows($this->query_result);
$this->nf .= "xYz" . @mysql_num_fields($this->query_result);
// SQL-Zeitmessung Anfang
$zmtime = microtime();
$zmtime = explode(" ",$zmtime);
$zmende = $zmtime[1] + $zmtime[0];
$zmtotal = round(($zmende - $zmstart), 5);
$this->zmtotal += $zmtotal;
$this->zmteil .= "xYz" . $zmtotal;
$this->abfrage .= "xYz" . $abfrage;
// SQL-Zeitmessung Ende
$mtime = microtime();
$mtime = explode(" ",$mtime);
$mtime = $mtime[1] + $mtime[0];
$endtime = $mtime;
$this->sql_time += $endtime - $starttime;
return ( $transaction == END_TRANSACTION ) ? true : false;
}
}
Die zahlen da drin hab ich entfernt also nicht wundern.################## Zeitpunkt: 14.05.2007-19:05
### Datei: includes/sessions.phpxYz
### Zeile: 158
### Zeit: 12.98636
### Abfrage: SELECT ban_ip, ban_userid, ban_email
FROM phpbb_banlist
WHERE ban_ip IN ('', ', ', ')
OR ban_userid = -1
################## Ende Zeitpunkt ###
################## Zeitpunkt: 14.05.2007-19:05
### Datei: common.phpxYz
### Zeile: 217
### Zeit: 177.7089
### Abfrage: SELECT *
FROM phpbb_config
################## Ende Zeitpunkt ###
Am meisten probleme scheint aber die sessions.php zu machen. Ich habe übgrigens den SEO URL mod drin, kann das damit zusammenhängen ?################## Zeitpunkt: 14.05.2007-19:05
### Datei: includes/functions.phpxYz
### Zeile: 163
### Zeit: 9.79366
### Abfrage: UPDATE phpbb_config SET
config_value = 'blahblah'
WHERE config_name = 'rand_seed'
################## Ende Zeitpunkt ###
################## Zeitpunkt: 14.05.2007-19:05
### Datei: includes/sessions.phpxYz
### Zeile: 178
### Zeit: 15.9998
### Abfrage: UPDATE phpbb_sessions
SET session_user_id = -1, session_start = blahblah, session_time = blahblah, session_page = -14, session_logged_in = 0, session_admin = 0, SearchBot = Mozilla/5.0 (Windows; U; Windows NT 5.1; pl; rv:1.8.0.11) Gecko/20070312 Firefox/1.5.0.11
WHERE session_id = ''
AND session_ip = 'blahblah'
################## Ende Zeitpunkt ###
naja wie gesagt die suche macht mir eigentlich noch keine probleme abermgutt hat geschrieben:Da brauchst Du Dir keine Gedanken mehr drum machen. Ich denke phpBB3 wird auf Volltextsuche setzen, dann ist dieser Wordtable-Quatsch weg.