0

下から順に2行目と3行目を確認してください。

[2012-09-11 16:44:55] event.DEBUG: Notified event "kernel.request" to listener "Symfony\Component\HttpKernel\EventListener\ProfilerListener::onKernelRequest". [] {"token":"504f6a8727898"}
[2012-09-11 16:44:55] event.DEBUG: Notified event "kernel.request" to listener "Symfony\Bundle\FrameworkBundle\EventListener\SessionListener::onKernelRequest". [] {"token":"504f6a8727898"}
[2012-09-11 16:44:55] event.DEBUG: Notified event "kernel.request" to listener "Symfony\Component\HttpKernel\EventListener\RouterListener::onKernelRequest". [] {"token":"504f6a8727898"}
[2012-09-11 16:44:55] request.INFO: Matched route "myapp_main_default_index" (parameters: "_controller": "Myapp\MainBundle\Controller\DefaultController::indexAction", "_route": "myapp_main_default_index") [] {"token":"504f6a8727898"}
[2012-09-11 16:44:55] event.DEBUG: Notified event "kernel.request" to listener "Symfony\Component\HttpKernel\EventListener\LocaleListener::onKernelRequest". [] {"token":"504f6a8727898"}
[2012-09-11 16:44:55] event.DEBUG: Notified event "kernel.request" to listener "Symfony\Component\Security\Http\Firewall::onKernelRequest". [] {"token":"504f6a8727898"}
[2012-09-11 16:44:55] security.DEBUG: Read SecurityContext from the session [] {"token":"504f6a8727898"}
[2012-09-11 16:44:55] security.DEBUG: Reloading user from user provider. [] {"token":"504f6a8727898"}
[2012-09-11 16:44:55] doctrine.INFO: MongoDB query: {"find":true,"query":{"_id":{"$id":"504f548c8c2d892617000000"}},"fields":[],"db":"myapp_db","collection":"User"} [] {"token":"504f6a8727898"}
[2012-09-11 16:44:55] doctrine.INFO: MongoDB query: {"limit":true,"limitNum":1,"query":{"_id":{"$id":"504f548c8c2d892617000000"}},"fields":[]} [] {"token":"504f6a8727898"}
[2012-09-11 16:44:55] doctrine.INFO: MongoDB query: {"limit":true,"limitNum":1,"query":{"_id":{"$id":"504f548c8c2d892617000000"}},"fields":[]} [] {"token":"504f6a8727898"}
[2012-09-11 16:44:55] security.DEBUG: Username "test" was reloaded from user provider. [] {"token":"504f6a8727898"}

重複したクエリを作成しているように私には思えます。

私は何をすべきか?

4

1 に答える 1

0

今では、クエリを2回以上行うのではなく、ログを記録する方法だけだと思います。他のクエリでは、クエリの各部分に1つのログ行がありますが、開発ツールバーには1つのクエリとして表示されるため、正しくなければなりません。

于 2012-10-09T02:04:06.017 に答える