Ctrl K
Java · Senior · System design

Once a day you need to process tens of millions of rows from the database and recompute data based on them, in Java with Spring and JPA. How would you design that processing?

~10 min by voice

How to approach it

This checks whether the candidate understands how Hibernate and the database behave at large volumes: persistence context memory, pagination, batching, transaction size. And whether they can design a reliable job that is restartable, parallel and safe for the production database.

Have you seen this question in a real interview?
Answers0
Avg. score—
Strong—
Practiced0
Topics
Similar questionsYou notice that the order list page runs hundreds of SQL queries. What could be causing it on the JPA side, and how would you fix it? Mid-levelWhat is the N+1 problem in Hibernate, how do you detect it, and what ways do you have of solving it? What are the trade-offs of each approach? SeniorOnce a day you need to import a CSV with several million rows into the database through an existing JPA layer. How would you design the import so it doesn't run out of memory and finishes in time? Mid-level

Answer by voice

The interviewer will ask this question and listen. Think out loud and ask for a hint if you need one. When you're done, pause or tap “That's my answer”. In about a minute, your score and the points you covered show up here.

Sign in to answer

Best with headphones · ~10 min