question about connection efficiency in database
Hi
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
"10101010001000100010101010109922342123456"
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?
Regards.
Anderson.