What is the fastest way to query for items with an existing foreign key and many-to-many entry in Django?
I have a simple model with a foreign key and a many-to-many relationship:
Query perfomance for main table with many-to-many relation in Django painfully slow on staging environment
I have a Django app which works with geodata. Querying the main table from Djangos ORM containing some larger polygons is all in all ridiculously slow, especially on our staging environment.