Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8534213
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T10:08:32+00:00 2026-06-11T10:08:32+00:00

I have bunch of tools stored in one table and each tools associated transactions

  • 0

I have bunch of tools stored in one table and each tools associated transactions stored in its child table. I have an algorithm that determines what tool to buy based on its performance in the transaction table entries. My output of the algorithm may recommend to buy a tool and may not based on its performance.

My end goal is only to show the list of tools page by page ( with server side pagination ) which are recommended to buy by the algorithm. My question here is, if I fetch first 10 tools and its transactions and give as input to the algorithm, my algorithm may or may not recommend all the tools to buy, in such a case, the tools which are eligible to display are not enough for the current page. I have to again go back to the data base and fetch few more until my results are enough to display the current page ( which includes too many db iterations ).

I am currently fetching everything and caching the results collection at the serverside ( with Ehcache) and applying the server side pagination over my collection. But this is pushing the server to go out of memory if too many concurrent users hit this page.

What is the best solution for this kind of issue..!!?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T10:08:33+00:00Added an answer on June 11, 2026 at 10:08 am

    I’m afraid there is no silver bullet solution, but I would like to share my thoughts here

    Usually if you want an accurate result for the pagination you ideally need to run all the iteration in the same transaction, otherwise the data just won’t be consistent because of parallel updates that can be done to your persistent storage. However I’m not sure its possible from your post.

    So, consider the following:

    • Don’t store everything in memory like you do now, instead maintain some share objects pool in memory and the parallel customers would only store pointers to your objects instead of the whole objects.

    • Use some kind of serialization of your results. Besides trivial serialization you may be interested in “off heap memory” it works with ehcache : http://ehcache.org/documentation/user-guide/bigmemory

    • Consider to store only tool id accross the iteration and maybe bare minimum of data that algorithm needs to make a decision. Then when you’re ready to display results make additional request and bring from the persistence layer what you need for showing up the results by supplying series of ids as an input. The chances are that you still won’t need all the data and this will save up your memory

    • Increase the heap. Trivial 🙂

    Hope this helps

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a bunch of strings that are dependent on static dictionaries and each
I have a bunch of software tools that are installed on 50-100 Windows 7
I have a bunch of very simple functions. Each function has one input and
Okay. I have a database that has bunch of stored procedures and references another
I have a bunch of generated functions from a supplier's tool are required to
I have a bunch of html files that come with my app and are
I have a bunch of code in a routine that looks a bit like
I have an application creating a bunch of divs through a loop. Each div
I have a bunch of automatically generated JSON files that I want to store
I have a bunch of work that was lost on a hard drive that

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.