I'm wondering why MyBatis is slow in my application.
For a SELECT COUNT(*), the time taken is:
20 secs - first request
2-3 secs - subsequent requests
Caching, most likely, is making the subsequent requests faster.
Configuration
- 3-tier (WPF UI - Java Backend - Oracle Database)
- JBoss Server exposes the Java Backed as a Web-Service for the WPF UI
- Request time == time taken between when the WPF UI sends and receives
the result
Approaches tried
1. *Disabled logging*
I don't know if disabling both the logging subsystem and log4j makes a
difference; but, the best I got was 15 secs for the SELECT COUNT(*).
2. *Disabled Caching and Lazy loading*
This too probably made a 5 sec difference at most.
Do the following help?
1. Using explicit* result mapping*, by turning off auto-mapping. (See
Result Maps here).
2. Using *Pooling*. (See environments here).
I gathered these techniques from: here.
<
http://mybatis-user.963551.n3.nabble.com/myBatis-is-slow-td2236249.html>
Another example
For a nested SQL statement with 2 joins and 1 sub-query, the time taken is:
60-90 secs - first request
2-3 secs - subsequent requests
--
View this message in context:
http://mybatis-user.963551.n3.nabble.com/MyBatis-very-slow-tp4025893.html
Sent from the mybatis-user mailing list archive at Nabble.com.