Getting all queries that django run on postgresql

前端 未结 4 353
傲寒
傲寒 2021-01-19 14:31

I am working on a django-postgresql project and I need to see every query that django run on database(so I can fine-tune queries). Is there a way to get those queries. Updat

4条回答
  •  失恋的感觉
    2021-01-19 14:51

    Check out this Question (and the two top most answers): django orm, how to view (or log) the executed query?

    You can also have a look at the Djando documenation: https://docs.djangoproject.com/en/dev/faq/models/#how-can-i-see-the-raw-sql-queries-django-is-running

    Hope this helps, Anton

提交回复
热议问题