We using Jira Server with Scriptrunner. When I fire a sql request with groovy it takes sometimes 10x longer than direct as sql request. But we also have extreme fluctuations.
The database is Oracle. In jira the max pool size is 20 connections.
My example SQL (~3500 rows)
SELECT * FROM CWD_USER_ATTRIBUTES
With groovy/scriptrunner:
DatabaseUtil.withSql("MY_POOL") { StrictSql sql ->
sql.rows(sqlString)
}Some test calls in milliseconds:
- 2063
- 369
- 2069
- 1035
- 2676
- 1849
- 1624
With a sql client without scriptrunner (milliseconds):
Smaller SQL request with only one row needs <20ms. No problems.
Anybody an idea or a tip for better analyse?
Thank you!