• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Performance

 
sudha swami
Ranch Hand
Posts: 186
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I have 2 tables A and B and they are linked with an ID. I need to update the address information in the table A based on the address information on Table B. There are 1500 records in the table A and in the table B there are 110000 records.

Method1

I can execute the stored procedure which in turn will update the table A address information from the table B's address information based on ID.

Method 2

In JAVA-JDBC code, retrieve each record from tableA and update the address info.

Which is the better approach performance wise?

Any help is appreciated.

Thanks
Sudha




 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 34229
341
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Method one would perform better because it would be less database round trips and less data being sent around. Even faster would be to not duplicate the info which would avoid the need for part of this operation.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic