我有上千个记录,需要用一个用户点击来检索。目前,它给我的结果非常缓慢,我必须等待很长时间。是否有办法用冬眠来改进这些结果的检索?
我有一个案例, 一个有选择查询的方法 将每分钟运行一次。 这是Hibernate给我的慢结果。 我使用与 MySQL 的休眠 。
我有上千个记录,需要用一个用户点击来检索。目前,它给我的结果非常缓慢,我必须等待很长时间。是否有办法用冬眠来改进这些结果的检索?
我有一个案例, 一个有选择查询的方法 将每分钟运行一次。 这是Hibernate给我的慢结果。 我使用与 MySQL 的休眠 。
通常的做法是启用二级缓存和查询缓存。 您的数据不会从 db 中读取, 而不是从记忆中读取 。
http://www.javalobby.org/java/forums/t48846.html" rel="noreferrer" >这里
其他事情可以有所帮助:
1 索引化 - 如果有位置和顺序, 您需要为您正在搜索/ 排序的字段建立索引 - 这样可以提高搜索速度10 次
2 非正规化――如果你有很多人加入的话, 某些非正规化(将全部列在单张表格中)可以起到帮助作用。 但是,当其他一切失败时,这应该是最终的解决办法。
我建议你使用Puginating
,如果你必须在网页上显示记录并同时检索部分记录(100)的话。
Hi have this j2ee web application developed using spring framework. I have a problem with rendering mnessages in nihongo characters from the properties file. I tried converting the file to ascii using ...
Check this, List<String> list = new ArrayList<String>(); for (int i = 0; i < 10000; i++) { String value = (""+UUID.randomUUID().getLeastSignificantBits()).substring(3, ...
I am in the middle of solving a problem where I think it s best suited for a decorator and a state pattern. The high level setting is something like a sandwich maker and dispenser, where I have a set ...
I have been trying to execute a MS SQL Server stored procedure via JDBC today and have been unsuccessful thus far. The stored procedure has 1 input and 1 output parameter. With every combination I ...
I have a system which contains multiple applications connected together using JMS and Spring Integration. Messages get sent along a chain of applications. [App A] -> [App B] -> [App C] We set a ...
If I m given two Java Libraries in Jar format, 1 having no bells and whistles, and the other having lots of them that will mostly go unused.... my question is: How will the larger, mostly unused ...
I have a Class variable that holds a certain type and I need to get a variable that holds the corresponding array class. The best I could come up with is this: Class arrayOfFooClass = java.lang....
I m working on a Java desktop application that reads and writes from/to different files. I think a better solution would be to replace the file system by a SQLite database. How hard is it to migrate ...