Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Performance issue when update the DB  RSS feed

 
sarah Marsh
Ranch Hand
Posts: 282
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello all,
There is a scenario like this:
Application A grab a bunch of rows of data from
database, then send row by row(have to be row by row here) to another application B for processing.
After processing one row, the application B
send back the flag to let A know if that row was
processed successfully or not. Then Application A
update the database by the flag.

In order to improve the performance, how to handle
the above part (in bold) probably?
Thanks in advance,
Sarah
 
Ramakrishnan G
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hai Sarah,
Try stored procedure using the JDBC Callable statement, If u r not going to return too many parameters outside from database. Because as i understood u r going to read process and update a single flag then it is better to it in the backend
 
sarah Marsh
Ranch Hand
Posts: 282
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Ramakrishnan,
Because Application B has to send A the processed
results row by row, I think A must create the
thread to handle the result and update the
database, right?
Sarah
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!