Skip to content

Add missing SQL indexes #20954

@jeremystretch

Description

@jeremystretch

Proposed Changes

Add indexes for generic foreign keys on the following models:

  • circuits.CircuitTermination (termination_type, termination_id)
  • dcim.MACAddress (assigned_object_type, assigned_object_id)
  • ipam.Prefix (scope_type, scope_id)
  • virtualization.Cluster (scope_type, scope_id)
  • wireless.WirelessLAN (scope_type, scope_id)

Additionally, ensure that all models have indexes for fields which are used for default ordering.

Justification

Adding these indexes will improve response times for common queries where a large number of records exist.

Metadata

Metadata

Assignees

No one assigned

    Labels

    netboxtype: housekeepingChanges to the application which do not directly impact the end user

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions