https://github.com/samdark/yii-db-profiler
  
  
    Yii profiler adjusted to deal with MySQL performance optimizations 
    https://github.com/samdark/yii-db-profiler
  
database profiler queries sql yii
        Last synced: 7 months ago 
        JSON representation
    
Yii profiler adjusted to deal with MySQL performance optimizations
- Host: GitHub
- URL: https://github.com/samdark/yii-db-profiler
- Owner: samdark
- Created: 2013-04-04T12:53:46.000Z (over 12 years ago)
- Default Branch: master
- Last Pushed: 2014-02-14T15:07:09.000Z (over 11 years ago)
- Last Synced: 2025-03-27T12:38:26.251Z (7 months ago)
- Topics: database, profiler, queries, sql, yii
- Language: PHP
- Size: 125 KB
- Stars: 24
- Watchers: 6
- Forks: 8
- Open Issues: 1
- 
            Metadata Files:
            - Readme: readme.md
- Changelog: changelog.md
 
Awesome Lists containing this project
README
          DB profiler
===========
Instead of regular `CProfileLogRoute` DB profiler displays database queries and
query-related info only. Also it have an ability to highligt possibly slow queries
and queries repeated many times.
Installation
------------
Unpack to `protected/extensions/`. Add the following to your `protected/config/main.php`:
~~~
 array(
		// …
		'db' => array(
			// …
			'enableProfiling'=>true,
			'enableParamLogging' => true,
		),
		'log'=>array(
			'class'=>'CLogRouter',
			'routes'=>array(
					// …
            	    array(
                	    'class'=>'ext.db_profiler.DbProfileLogRoute',
						'countLimit' => 1, // How many times the same query should be executed to be considered inefficient
						'slowQueryMin' => 0.01, // Minimum time for the query to be slow
                	),
			),
		),
	),
);
~~~