开发者

How to profile SQL queries using ADODB?

I'm using ADODB library for sql manipulation, but i'm wondering if there is way to display each:

  • Query Syntax
  • Processing Time
  • Fetched Rows
  • Affected Rows

In a way like firebug in the bottom of pages during development which means it would be s开发者_Python百科uper useful to improve the performance and debugging.

Thanks


You probably have to write your own output for firebug console. Fetch needed details about queries with using
adodb_backtrace($e->gettrace());
Affected_Rows( )
LogSQL(true)

$perf = NewPerfMonitor($conn);`
$perf->SuspiciousSQL();
$perf->ExpensiveSQL();`

and more...

according to the manual
http://phplens.com/lens/adodb/docs-adodb.htm
http://phplens.com/lens/adodb/docs-perf.htm

try it using these links

http://snipplr.com/view/7963/show-mysql-query-log-with-firebug/
http://michaelsync.net/2007/09/09/firebug-tutorial-logging-profiling-and-commandline-part-i

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜