Open
Description
Deployment Type
Self-hosted
NetBox Version
v4.3.2
Python Version
3.12
Steps to Reproduce
- For each of these endpoints:
- api/ipam/services
- api/ipam/vlan-groups
- api/virtualization/clusters
- Create a few objects of each type and enable e.g. the Django debug toolbar to count the number of queries
- Note the number of queries
- Add a few more objects
Expected Behavior
- Number of DB queries stays roughly the same (Like e.g. for the devices endpoint)
Observed Behavior
- Number of queries increases by roughly the same number as the number of objects added (I guess some prefetch_related/select_related are missing)
Service: One query per parent
VLAN-Group: One query per scope
Cluster: One query per site