<tfoot id='QrJ74'></tfoot>
    1. <i id='QrJ74'><tr id='QrJ74'><dt id='QrJ74'><q id='QrJ74'><span id='QrJ74'><b id='QrJ74'><form id='QrJ74'><ins id='QrJ74'></ins><ul id='QrJ74'></ul><sub id='QrJ74'></sub></form><legend id='QrJ74'></legend><bdo id='QrJ74'><pre id='QrJ74'><center id='QrJ74'></center></pre></bdo></b><th id='QrJ74'></th></span></q></dt></tr></i><div id='QrJ74'><tfoot id='QrJ74'></tfoot><dl id='QrJ74'><fieldset id='QrJ74'></fieldset></dl></div>
        <bdo id='QrJ74'></bdo><ul id='QrJ74'></ul>

    2. <small id='QrJ74'></small><noframes id='QrJ74'>

      <legend id='QrJ74'><style id='QrJ74'><dir id='QrJ74'><q id='QrJ74'></q></dir></style></legend>

      1. MySQL - 如何跟踪每个查询?

        MySQL - How to track every query?(MySQL - 如何跟踪每个查询?)
          <bdo id='Esq9c'></bdo><ul id='Esq9c'></ul>
        • <tfoot id='Esq9c'></tfoot>

            <legend id='Esq9c'><style id='Esq9c'><dir id='Esq9c'><q id='Esq9c'></q></dir></style></legend>

            <small id='Esq9c'></small><noframes id='Esq9c'>

            <i id='Esq9c'><tr id='Esq9c'><dt id='Esq9c'><q id='Esq9c'><span id='Esq9c'><b id='Esq9c'><form id='Esq9c'><ins id='Esq9c'></ins><ul id='Esq9c'></ul><sub id='Esq9c'></sub></form><legend id='Esq9c'></legend><bdo id='Esq9c'><pre id='Esq9c'><center id='Esq9c'></center></pre></bdo></b><th id='Esq9c'></th></span></q></dt></tr></i><div id='Esq9c'><tfoot id='Esq9c'></tfoot><dl id='Esq9c'><fieldset id='Esq9c'></fieldset></dl></div>
                  <tbody id='Esq9c'></tbody>

                • 本文介绍了MySQL - 如何跟踪每个查询?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  <块引用>

                  可能重复:
                  如何启用 MySQL 查询日志?

                  有没有办法跟踪 MySQL 中的每个 SQL 查询?

                  我正在使用 Doctrine ORM 构建实体并从数据库中获取它们,并且想看看 Doctrine 产生了哪些查询.那么当我刷新一个使用 Doctrine ORM 从数据库中获取一些数据的网页时,我在哪里可以看到在数据库中执行的查询?

                  这可能吗?

                  解决方案

                  让这个应用程序决定是否要记录查询,如果要记录所有查询,请在 MySQL 端记录查询.

                  Doctrine 在包中有一个内置的记录器接口和一个演示记录器.来自 http://docs.doctrine-project.org/en/2.0.x/reference/configuration.html#sql-logger-optional:

                  setSQLLogger($logger);$config->getSQLLogger();

                  <块引用>

                  获取或设置记录器,用于记录 Doctrine 执行的所有 SQL 语句.记录器类必须实现 DoctrineDBALLoggingSQLLogger 接口.可以在 DoctrineDBALLoggingEchoSQLLogger 中找到使用 echo 和 var_dump 记录到标准输出的简单默认实现.`

                  Possible Duplicate:
                  How to enable MySQL Query Log?

                  Is there a way to track every SQL query in MySQL?

                  Im using Doctrine ORM to build entities and fetch them from database, and would like to see what queries is Doctrine producing. So when I refresh a webpage that uses Doctrine ORM to fetch some data from database, where could I see queries executed in database?

                  Is this possible?

                  解决方案

                  Let this application decide if you want queries logged and log queries on MySQLs side if you want all queries logged.

                  Doctrine has a builtin logger interface and a demo logger in the package. From http://docs.doctrine-project.org/en/2.0.x/reference/configuration.html#sql-logger-optional :

                  <?php
                  $config->setSQLLogger($logger);
                  $config->getSQLLogger();
                  

                  Gets or sets the logger to use for logging all SQL statements executed by Doctrine. The logger class must implement the DoctrineDBALLoggingSQLLogger interface. A simple default implementation that logs to the standard output using echo and var_dump can be found at DoctrineDBALLoggingEchoSQLLogger.`

                  这篇关于MySQL - 如何跟踪每个查询?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                  相关文档推荐

                  When should use doctrine ORM and when zend-db-table?(什么时候应该使用学说 ORM,什么时候应该使用 zend-db-table?)
                  Doctrine - self-referencing entity - disable fetching of children(Doctrine - 自引用实体 - 禁用获取子项)
                  Doctrine 2, query inside entities(原则 2,实体内部查询)
                  Complex WHERE clauses using the PHP Doctrine ORM(使用 PHP Doctrine ORM 的复杂 WHERE 子句)
                  Doctrine - OneToMany relation, all result row doesn#39;t fetch in object(Doctrine - OneToMany 关系,所有结果行不获取对象)
                  Doctrine and unrefreshed relationships(教义和未更新的关系)
                  • <bdo id='xWmRa'></bdo><ul id='xWmRa'></ul>

                      <tfoot id='xWmRa'></tfoot>

                      • <i id='xWmRa'><tr id='xWmRa'><dt id='xWmRa'><q id='xWmRa'><span id='xWmRa'><b id='xWmRa'><form id='xWmRa'><ins id='xWmRa'></ins><ul id='xWmRa'></ul><sub id='xWmRa'></sub></form><legend id='xWmRa'></legend><bdo id='xWmRa'><pre id='xWmRa'><center id='xWmRa'></center></pre></bdo></b><th id='xWmRa'></th></span></q></dt></tr></i><div id='xWmRa'><tfoot id='xWmRa'></tfoot><dl id='xWmRa'><fieldset id='xWmRa'></fieldset></dl></div>
                            <tbody id='xWmRa'></tbody>
                        • <legend id='xWmRa'><style id='xWmRa'><dir id='xWmRa'><q id='xWmRa'></q></dir></style></legend>

                          <small id='xWmRa'></small><noframes id='xWmRa'>