DB queries in django scripts

56 views
Skip to first unread message

Web Architect

unread,
Apr 10, 2019, 1:57:51 AM4/10/19
to Django users
Hi,

We have a Django 1.11 based ecommerce web site. 

We use django management scripts and django extension of runscript heavily for DB operations - running under cron. 

There's a tool - django-debugtoolbar to check the DB queries on the web. But is there a tool to monitor/check the DB queries for scripts? This would be really helpful in our script optimisation.

Looking forward to the info.

Thanks.

Derek

unread,
Apr 11, 2019, 3:57:02 AM4/11/19
to Django users
If you are using PostggeQL you may want to look at the query analysis produced by:
https://www.postgresql.org/docs/current/pgstatstatements.html

There are various third-party tools to gather output from the pg_stat_statements and make it available e.g.

Web Architect

unread,
Apr 15, 2019, 10:17:02 AM4/15/19
to Django users
Hi Derek,

Thanks for your response. We are using MySQL. Could you suggest something similar for the same?

Thanks.

Derek

unread,
Apr 17, 2019, 2:40:33 AM4/17/19
to Django users
Sorry, no, we use Postgresql - perhaps you may want to consider it too (it is the recommended one for Django)?

Failing that, I know there are numerous third-party tools for MySQL/Maria - perhaps have a look and see what can be found. Eg. Google shows me this one:
Reply all
Reply to author
Forward
0 new messages