python - Pandas read_sql metadata lock -
i using pandas read mysql tables. after read_sql statement table lock on table. below queries,
mysql_cn= mysqldb.connect(host='localhost', port=3306,user='root',passwd='mysql', db='db_p001') dfvars = pd.read_sql('select * markeff_5_varlist', con=mysql_cn, chunksize = 10)
once run the dfvars dataframe populated, there read lock in mysql. locks persists until mysql restarted.
-------------- row operations -------------- 0 queries inside innodb, 0 queries in queue 1 read views open inside innodb main thread process no. 2567, id 140597860407040, state: sleeping number of rows inserted 0, updated 0, deleted 0, read 11494 0.00 inserts/s, 0.00 updates/s, 0.00 deletes/s, 3.31 reads/s ---------------------------- end of innodb monitor output ============================
i appreciate help.
thanks,
Comments
Post a Comment