2 Posts Tagged ‘mysql’

(All tags.)


Building a better DatabaseCache for Django on MySQL

Figure 1 - MySQLCache in the flesh

I recently released version 0.1.10 of my library django-mysql, for which the main new feature was a backend for Django’s cache framework called MySQLCache. This post covers some of the inspiration and improvements it has, as well as a basic benchmark against Django’s built-in DatabaseCache.

Read more...

Extending Django’s QuerySet to return approximate COUNTs

I was looking through the MySQL slow_log for YPlan and discovered that there were a lot of SELECT COUNT(*) queries going on, which take a long time because they require a full table scan. These were coming from the Django admin, which displays the total count on every page.

Read more...