Ask a Question
Advertise on boostr.in
Organizational Research By
Surprising Reserch Topic
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 ?
Sep 13, 2013
Sep 12, 2013
to add a comment.
Related Hot Questions
Government Jobs Opening