Answer the question
In order to leave comments, you need to log in
How to process a large amount of data?
There are a million accounts in the database. It is necessary to periodically launch the update process: for all accounts with the x==a parameter, change this parameter to x==b.
Answer the question
In order to leave comments, you need to log in
A wise pattern is stupidly not to drive data from the database back and forth. So run the update right in the database.
Don't look at trendy boys in hoodies who cancel stored procedures and triggers and advise you to turn the RDBMS into a dump of tables (and remove foreingn keys, because they get in the way).
And why pull something through Java? It is possible to schedule directly in the DBMS. An example for MS SQL to make it clear: https://www.osp.ru/winitpro/2017/01/13051261
Install pgAgent. Guide .
Create a task. Guide .
With a request (from Aleksey )UPDATE accounts SET x=b WHERE x=a;
Only pure SQL! Only hardcore!
And so use JDBC or Spring JdbcTemplate you will be happy. :-)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question