So, I have a database that has a lot of data inserted from a Java application. Usually I insert into table1, get the last identifier, then insert it into table2 again and get the last identifier from there, and finally insert into table3 and get this identifier, and also work with it in the application. And I insert about 1000-2000 rows of data every 10-15 minutes.
And using a lot of small inserts and selections on a production web server is not very good, because sometimes it fights with the server.
My question is: is there a way to insert multiple data into table1, table2, table3 without using so many samples and inserts? Is there an sql-fu technology that I'm skipping?
java performance mysql jdbc
Gabriel
source share