Hello. Please tell me how best to connect and work with the database (MySQL)? For example, if the speed of the Internet connection is 1.7 Mb / s, then the program constantly hangs for a few seconds until the data from the database comes. Logs and data that only need to be sent, I do in a separate stream - there is no problem with that.
Is it possible to arrange communication with the database not through components that work with the database directly (for example, zeos), but via web api? And to be more precise, will this design work faster? If not, how can you still organize the connection and work with the database?
The site and the database are located on the same server.