... see Query Statistics

Top 10 Queries by Average execution time

bean orig hash exe count avg beans avg micros autofetch tuned last query
detail app.data.Bug -604475720 5 0 2024 false 10-Mar 06:03:48
detail app.data.Bug -604475720 707 0 1789 true 10-Mar 09:42:57
detail app.data.Topic 722532051 17 0 1614 true 10-Mar 00:05:24
detail app.data.Bug -604475720 15 0 1470 true 10-Mar 07:40:19
detail app.data.Bug 993345720 1560 10 1417 true 10-Mar 07:40:25
detail app.data.Bug -1305179324 108 3 1364 true 10-Mar 09:26:03
detail app.data.Topic 722532051 2212 0 1235 true 10-Mar 09:45:10
detail app.data.Topic 592257536 959 20 868 true 10-Mar 09:34:45
detail app.data.User 1932188223 33 0 688 false 10-Mar 00:01:38
detail app.data.Forum 887892902 103 5 667 true 10-Mar 07:58:56

Top 10 Queries by Total aggregate execution time

bean orig hash exe count avg beans avg micros autofetch tuned last query
detail app.data.Topic 722532051 2212 0 1235 true 10-Mar 09:45:10
detail app.data.Bug 993345720 1560 10 1417 true 10-Mar 07:40:25
detail app.data.Bug -604475720 707 0 1789 true 10-Mar 09:42:57
detail app.data.Topic 592257536 959 20 868 true 10-Mar 09:34:45
detail app.data.Forum 722532051 2222 0 286 false 10-Mar 09:45:10
detail app.data.Forum 1908865224 959 0 587 true 10-Mar 09:34:45
detail app.data.BugAttachment -604475720 729 0 428 false 10-Mar 09:42:57
detail app.data.Bug -1305179324 108 3 1364 true 10-Mar 09:26:03
detail app.data.Topic -149309933 515 5 265 true 10-Mar 07:58:56
detail app.data.Forum 887892902 103 5 667 true 10-Mar 07:58:56

 

// code to get Top 10 queries by average execution time 

List<MetaQueryStatistic> list = Ebean.find(MetaQueryStatistic.class).findList();
  	
long nowMinus24Hrs = System.currentTimeMillis() -24*(1000*60*60);

list = Ebean.filter(MetaQueryStatistic.class)
		.sort("avgTimeMicros desc")
		.gt("executionCount", 0)
		.gt("lastQueryTime", nowMinus24Hrs)
		.maxRows(10)
		.filter(list);

Strictly speaking we are looking at Ebean "Query Plans". The query plan can be reused with different 'bind' values.

HeadingDescription
orig hashThe original (pre autofetch tuning) query plan hash
exe countNumber of Queries executed
avg beansAverage number of beans loaded per query
avg microsAverage number of microseconds each query execution takes
autofetch tunedTrue when the query is tuned by Autofetch
collection startTime and date when the statistics started being collected
Introduction User Guide (pdf) Install/Configure Public JavaDoc Whitepapers
General Database Specific Byte Code Deployment Annotations Features
Top Bugs Top Enhancements
woResponse