conn = MySQLdb.connect(host='localhost', user='bob', passwd='mypasswd', db=
    'bigdb')
curs = conn.cursor()
numrows = curs.execute('SELECT id, rating FROM video')
A = numpy.fromiter(curs.fetchall(), count=numrows, dtype='i4,i4')
print(A)
ids = A['f0']
ratings = A['f1']
What's the most efficient way to convert a MySQL result set to a NumPy array?