questions - Question:Why django and python MySQLdb have one cursor per database?

MySQL running a single server -> HOSTNAME

Two MySQL databases on that server -> USERS , GAMES .

Task -> Fetch 10 newest games from GAMES.my_games_table , and fetch users playing those games from USERS.my_users_table ( assume no joins )

In Django as well as Python MySQLdb , why is having one cursor for each database more preferable ?

What is the disadvantage of an extended cursor which is single per MySQL server and can switch databases ( eg by querying "use USERS;" ), and then work on corresponding database

MySQL connections are cheap, but isn't single connection better than many , if there is a linear flow and no complex tranasactions which might need two cursors ?

asked Sep 13, 2013 in MYSQL by rajesh
edited Sep 12, 2013
0 votes

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
Anti-spam verification:
To avoid this verification in future, please log in or register.