读取数据库加载内存的问题?

db=MySQLdb.connect(host="127.0.0.1",user="USER",passwd="123456",db="hive",charset="utf8" cursorclass=cursors.SSCursor)  
cursor = db.cursor()
n = cursor.execute("select * from table")
for row in cursor.fetchall():
    for r in row:    
        print r

select出来的数据需要一次性加载到内存吗?
阅读 3.4k
撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进
推荐问题