Django ORM creates indices for primary and foreign keys out of the box. However, if you perform a lot of queries on the rest of the columns (the columns that are used in a
filter() method) it makes sense to add indexes to them. This can be accomplished by adding
unique=True argument to a model field.
If you do a lot of cross-table queries (loading data from multiple tables) you might end up with N+1 problem. N+1 problem is when ORM produces an additional query for each associated row…