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 ?
Ratio of rows on past snapshots in the 'project_measures' table
First get the total number of rows in the project_measures :
Then get the total number of rows on past snapshots and divide the number by the previous one :
Which metrics generate the greatest number of rows in the 'project_measures' table on past snapshots ?
Ratio of rows on last snapshots in the 'project_measures' table
First get the total number of rows in the project_measures :
Then get the total number of rows on last snapshots and divide the number by the previous one :

