0
I’m with this Java method;
public String detalhesHistorico() {
listaHistoricoRemessa = historicoRemessaService.listar(historicoRemessa);
return "ajax-modal-historico";
}
Is there any java method that I can automatically load 10 records from the database?
I need to do it because there are 120 thousand more records and when I press screen it takes a lot. It would only be a palliative solution.
It takes too long in processing Java or in the course of consultation?
– RXSD
he performs a consultation!
– wladyband
Well, here at the company we do a technique of scroller-infinity.limiting the queries to 40 records per page, and trigging at the end of the scroller a new query by 40 records. You can implement Paging as well .
– Isaías de Lima Coelho
@Isaíasdelimacoelho how I do it?
– wladyband
Maybe what I need is a java method that is applied to the variable List
– wladyband
I’ll post the code in the answer to how to do it.
– Isaías de Lima Coelho
You managed to solve your problem ?
– RXSD
If the problem is even already query, there is not much to do besides improve the query, or adopt some caching strategy (ehcache, redis for example)
– nullptr