When Using CharField in Django Admin list_filter, Adding Choices Makes It Faster
2021-03-30 12:05 (4 years ago)

When specifying a CharField in list_filter in Django Admin,
if choices are not specified for that CharField, it fetches all existing values of all records using DISTINCT, which can be quite slow without an index.
In such cases, if it is possible to specify choices, doing so will eliminate the need for SQL queries and significantly speed up the process.
Currently unrated
The author runs the application development company Cyberneura.
We look forward to discussing your development needs.
We look forward to discussing your development needs.