Zend Framework 2 module for showing all executed queries and addition information

v1.3 2014-02-23 00:59 UTC

This package is not auto-updated.

Last update: 2021-04-11 22:18:07 UTC


Module that shows every executed query and the execution time.


  • Add "weteef/queryanalyzer": "1.*" to the require section of your composer.json
  • Add 'QueryAnalyzer' to the modules array in your application.config.php
  • Attach the QueryAnalyzerProfiler to your DB-Adapter.
->setProfiler(new \QueryAnalyzer\Db\Adapter\Profiler\QueryAnalyzerProfiler());
  • Copy the file queryanalyzer.global.php.dist to the config/autoload folder an rename it to queryanalyzer.global.php
  • Add any db adapter with a profiler to the 'dbadapter'array.
'dbadapter' => array(

After these steps the analyzer should appear on the bottom right corner of your browser window. You can click on it and a more detailed popup will appear.

alt tag


If you want to log Queries you need to define a logger in your service_manager config. Example:

'service_manager' => array(
   'factories' => array(
      'myLogger' => function ($sm){
         $logger = new Zend\Log\Logger;
         $writer = new Zend\Log\Writer\Stream(__DIR__.'/../../log');

         return $logger;

And add it to the log array in queryanalyzer.config.php

'loggers' => array(

Queries will be logged with the status: info.