Skip to content

Config context API queries still slow for large installations despite DISTINCT optimization #20358

@jnovinger

Description

@jnovinger

NetBox Edition

NetBox Community

NetBox Version

v4.4.0

Python Version

3.10

Steps to Reproduce

  1. Have a large installation (10k+ devices, 100+ config contexts)
  2. Make API requests like /api/dcim/devices/?limit=10
  3. Observe response times are still slower than expected for a 10-device response

While PR #20346 provided significant improvement (15x performance gain) for the config context query performance issue reported in #20327, users with large installations are still experiencing slower-than-acceptable API response times.

Expected Behavior

API requests for small result sets should return in reasonable time (<1s) regardless of total database size.

Observed Behavior

Even after the DISTINCT optimization in #20346 , API responses are still slower than expected for large installations.

Metadata

Metadata

Assignees

No one assigned

    Labels

    netboxseverity: lowDoes not significantly disrupt application functionality, or a workaround is availablestatus: needs ownerThis issue is tentatively accepted pending a volunteer committed to its implementationtype: bugA confirmed report of unexpected behavior in the application

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions