devices export generates linear number of sql queries #2000

Closed
opened 2025-12-29 17:21:20 +01:00 by adam · 1 comment
Owner

Originally created by @errx on GitHub (Sep 11, 2018).

Environment

  • NetBox version: develop branch

Steps to Reproduce

export devices:
/dcim/devices/?export

Expected Behavior

constant number of sql queries

Observed Behavior

linear number of sql queries

(because of rack.group is present in to_csv method of dcim.Device but not in DeviceListView queryset)

Originally created by @errx on GitHub (Sep 11, 2018). ### Environment * NetBox version: develop branch ### Steps to Reproduce export devices: /dcim/devices/?export ### Expected Behavior constant number of sql queries ### Observed Behavior linear number of sql queries (because of rack.group is present in to_csv method of dcim.Device but not in DeviceListView queryset)
adam closed this issue 2025-12-29 17:21:20 +01:00
Author
Owner

@jeremystretch commented on GitHub (Sep 13, 2018):

This does not indicate a bug. It is often more efficient to employ many small queries as opposed to one very large queries.

@jeremystretch commented on GitHub (Sep 13, 2018): This does not indicate a bug. It is often more efficient to employ many small queries as opposed to one very large queries.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#2000