Django Admin and millions of objects

Django admin is not really good when it comes to handling large amounts of data. Things got even worse if you use PostgreSQL as your database backend. Admin panel issuing a lot of select count(*) from table and postgres is quite slow performing this statement. Actually there is a page in postgres wiki dedicated to this issue - https://wiki.postgresql.org/wiki/Slow_Counting So when you deal with a lot of data in django you need to tweak admin a bit. Here is how.