> I am not closing the database connection nor closing the cursor. Does this effect the performance of the database?
I don't think so. But I don't recommend long living connection. It
cause many pitfalls.
* MySQL's wait_timeout may close connection from server side.
* When you change database setting via `SET GLOBAL` command, old
connection continue to use old configuration.
* OS or network router may close long idle connections.
* If MySQL is behind load balancer, long living connection will block
removing database server instance.
* etc...
> The physical connection will not break or fail?
Physical connection will be broken anytime, and long living connection
increase it's possibility.
> Do I have to close the connection explicitly? or will it be handled by the pymysql ?
PyMySQL doesn't close connection implicitly, because PyMySQL doesn't
use background thread or other mechanism.
You have to have connection manager (or pool) to manage connection lifetime.