我们正在尝试优化我们的dataserver应用程序.它通过mysql数据库存储股票和报价.我们对提取性能不满意.
- database
- table stock : around 500 lines
- table quote : 3 000 000 to 10 000 000 lines
- one-to-many association : one stock owns n quotes
- fetching around 1000 quotes per request
- there is an index on (stockId,date) in the quote table
- no cache, because in production, querys are always different
- Hibernate 3
- mysql 5.5
- Java 6
- JDBC mysql Connector 5.1.13
- c3p0 pooling
Run Code Online (Sandbox Code Playgroud)