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

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

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出来的数据需要一次性加载到内存吗?
【热门文章】
【热门文章】