question about connection efficiency in database
I am developing an application that sends data to the database (MySQL) of a website each 5 minutes (i.e. I am updating the record each 5 minutes).
the sent data has this form
my question is:
should I keep the connection open and update the data each five minutes and never close the connection; or should I close the connection after each update and re-open it again (i.e. establishing the connection again after 5 minutes for the next update) and in general what is the difference between the two approaches regarding the java application and the response of the website, any ideas, reviews?