fixing slowness when screen_pub queries the db #4
Loading…
Reference in New Issue
No description provided.
Delete Branch "fix-db-read"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
using mysql with peewee: http://docs.peewee-orm.com/en/latest/peewee/database.html#using-mysql
pymysql
: pure python, slowermysqlclient
: uses a c-extension, faster. module name:MySQLdb
depends onapt-get
packages:python3-dev
default-libmysqlclient-dev
build-essential
it would take 5-6 seconds (and lots of disk IO) per query, so it would take 25-30s to generate one message with my 5 sensors:
now it takes ~0.0007s per query, so it take ~0.002s to generate one message: