database (mysql) monitoring + query logs (profiling)

13 03 2007
Ole, moi le grand, j'ai trouvé :=)


Database performance monitoring and SQL tuning with the performance monitoring classes.

http://phplens.com/lens/adodb/docs-perf.htm




Sample :

fail kotorii sozdaeot zapros dlia loga :
====
session_start();
#ado_sql.php

require("database_config.php");
include("../../sys/adodb/adodb.inc.php");
include("../../sys/adodb/adodb-pager.inc.php");

$db = ADONewConnection($GLOBALS["database_server_driver"]);
$db->Connect($GLOBALS["database_server"],$GLOBALS["database_user"],$GLOBALS["database_password"],$GLOBALS["database_dbname"]);
$db->LogSQL(true);
$db->debug=false;
$sql="Select * from table_name where id='1'";
print $sql."
";
$rs =& $db->Execute($sql);
while (!$rs->EOF) {
/** select fields **/
$rs->MoveNext();
}

?>


fail "monitor"

session_start();
include_once('../../sys/adodb/adodb.inc.php');
require("database_config.php");
# session variables required for monitoring
$conn = ADONewConnection($GLOBALS["database_server_driver"]);
$conn->Connect($GLOBALS["database_server"],$GLOBALS["database_user"],$GLOBALS["database_password"],$GLOBALS["database_dbname"]);
$perf =& NewPerfMonitor($conn);
$perf->UI($pollsecs=5);
?>
Defined tags for this entry: 1


Обратные ссылки


Нет обратных ссылок

Комментарии

Показывать комментарии (Как список | Древовидной структурой)
Нет комментариев.

Добавить комментарий


Enclosing asterisks marks text as bold (*word*), underscore are made via _word_.
Standard emoticons like :-) and ;-) are converted to images.
E-Mail addresses will not be displayed and will only be used for E-Mail notifications

To prevent automated Bots from commentspamming, please enter the string you see in the image below in the appropriate input box. Your comment will only be submitted if the strings match. Please ensure that your browser supports and accepts cookies, or your comment cannot be verified correctly.
CAPTCHA