Skip to end of metadata
Go to start of metadata

The Sonar DB is the heart of any Sonar instance and managing the content of the DB to prevent it from growing too quickly is the goal of the House Cleaning mechanism. Sometimes, when developing a new Sonar plugin for instance, it can be useful to "profile" the content of this Sonar DB to understand what happens under the hood.

This page contains several SQL requests which allow to get answer to common profiling questions. All those requests can take very long time to be executed and should not be run in a production environment.

Which metrics generate the greatest number of rows in the 'project_measures' table ?

MySQL

Ratio of rows on past snapshots in the 'project_measures' table

First get the total number of rows in the project_measures :

MySQL

Then get the total number of rows on past snapshots and divide the number by the previous one :

MySql

Which metrics generate the greatest number of rows in the 'project_measures' table on past snapshots ?

MySQL

Ratio of rows on last snapshots in the 'project_measures' table

First get the total number of rows in the project_measures :

MySQL

Then get the total number of rows on last snapshots and divide the number by the previous one :

MySql

Which metrics generate the greatest number of rows in the 'project_measures' table on last snapshots ?

MySQL

Distribution of measures by resource type on past snapshots

MySQL
Labels
  • None