ResonantGeoData / RD-WATCH

RD-WATCH Documentation
https://resonantgeodata.github.io/RD-WATCH/
Apache License 2.0
6 stars 5 forks source link

Fix query explosion problem in django-admin #478

Closed zachmullen closed 1 month ago

zachmullen commented 1 month ago

The Satellite Fetching admin page was emitting tens of thousands of SQL queries when loading, even though my system contained zero satellite fetching records.

The reason for this was the list_filter on the site attribute, which was causing a SQL query for each SiteEvaluation that exists in the database to be issued.

Additionally, there was a similar issue when loading the Add satellite fetching page in django-admin, which was fixed by making site use the raw_id field behavior.