How to optimize the functions that connect to the database so that if many users access the database at the same time, the server does not crash or create another problem. Is it