Django Admin Range-Based Date Hierarchy

Last updated 1 year ago by Haki Benita

django

How we significantly improved the performance of Django Admin date hierarchy

A few weeks ago we encountered a major performance regression in one of our main admin pages. The page took more than 10 seconds to load (at best) and hit the query execution timeout at worst.

The page was an admin list view of a Transaction model — one of the main models which is used by support personal on a daily basis. The model had millions of rows and used several joins to display relevant information.

The most common use for the page was to filter transactions by a certain period (most commonly the last day). We used Django admin date hierarchy to add a filter on the created field of the model.

Read full Article