Django SQL Sampling

Any site of a large size with have lots of different queries going on. If you're having performance trouble it's easy to find and fix the ones that are causing trouble. It's not so easy if you have a query that runs moderately fast but is run a lot. It's not even easy to find such queries.

Enter Django SQL Sampler (github link). This little tool that I wrote will sample a configurable percentage of SQL queries and group them by stack trace. It then gives you a view over these queries that allows you to find the queries that are taking up the most cumulative time - these are the queries that should be optimised or cached.

Let me know what you think!


blog comments powered by Disqus

Colin Howe

I'm Colin. I like coding, ultimate frisbee and startups. I am VP of engineering at Conversocial