... 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 -1305179324 2268 4 1768 true 03-Sep 01:13:39
detail app.data.Bug -604475720 30428 0 1764 true 03-Sep 02:18:10
detail app.data.Bug 993345720 35365 11 1560 true 03-Sep 01:13:39
detail app.data.Topic 722532051 63638 0 1258 true 03-Sep 02:26:46
detail app.data.Topic 592257536 29306 20 824 true 03-Sep 02:30:45
detail app.data.Forum 887892902 2460 5 587 true 02-Sep 22:01:05
detail app.data.Forum 1908865224 29306 0 538 true 03-Sep 02:30:45
detail app.data.User 1932188223 394 0 527 true 02-Sep 05:38:12
detail app.data.BugAttachment -604475720 30454 0 374 false 03-Sep 02:18:10
detail app.data.Forum 722532051 63652 0 280 false 03-Sep 02:26:46

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 63638 0 1258 true 03-Sep 02:26:46
detail app.data.Bug 993345720 35365 11 1560 true 03-Sep 01:13:39
detail app.data.Bug -604475720 30428 0 1764 true 03-Sep 02:18:10
detail app.data.Topic 592257536 29306 20 824 true 03-Sep 02:30:45
detail app.data.Forum 722532051 63652 0 280 false 03-Sep 02:26:46
detail app.data.Forum 1908865224 29306 0 538 true 03-Sep 02:30:45
detail app.data.BugAttachment -604475720 30454 0 374 false 03-Sep 02:18:10
detail app.data.Bug -1305179324 2268 4 1768 true 03-Sep 01:13:39
detail app.data.Topic -149309933 12300 5 216 true 02-Sep 22:01:05
detail app.data.Forum 887892902 2460 5 587 true 02-Sep 22:01:05

 

// 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