Is there a way or setting in Peewee where I can get it to print out all the queries being executed in order to debug and understand potential performance issues.
Peewee to print generated queries
Asked Answered
Yes, it is documented: http://docs.peewee-orm.com/en/latest/peewee/database.html#logging-queries
# Print all queries to stderr.
import logging
logger = logging.getLogger('peewee')
logger.setLevel(logging.DEBUG)
logger.addHandler(logging.StreamHandler())
© 2022 - 2024 — McMap. All rights reserved.