Search code examples
djangosqlalchemypyramidwerkzeugdjango-debug-toolbar

Django/Pyramid debugtoolbar: is it possible to see not only making query time, but also query duration in database?


And if not, how to check? I'm using SQLAlchemy.

Thanks!


Solution

  • Both projects use werkzeug as far as I can say. Pyramid does use it, and I only heard about django using it but never tried. That said both toolbars should be very different because they depends on different projects.

    If you want the query time for sqlalchemy. There are a couple of ways to do that as it's been discussed there.

    How can I profile a SQLAlchemy powered application?

    With plain old python logging you can guess the time between querys if you enable debugging. The pyramid toolbars allows profiling so you can also there check how much time it took for which functions.

    According to the docs, the debug toolbar in sqlalchemy displays time in ms for queries.

    http://docs.pylonsproject.org/projects/pyramid_debugtoolbar/en/latest/api.html