Searching for IP addresses in the arp API endpoint is horribly inefficient
Bug #1619138 reported by
Morten Brekkevold
This bug affects 2 people
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Network Administration Visualized |
Fix Released
|
Medium
|
Morten Brekkevold |
Bug Description
IP-based searches using the arp API endpoint are slow. This is because the `ip` filter is subjected to the default handling of Django REST Framework, which produces Django's horrible default search filter for IP address fields: "HOST(ip) = 'someip'". This casts PostgreSQLs INET datatypes to strings, rendering the ip field index unused as sequential table scans are used instead.
The ip field filter should be handled manually, as it is elsewhere in similar NAV code.
Bonus: We can also handle prefix searches in an improved way when this is done.
Changed in nav: | |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
fix here: https:/ /nav.uninett. no/hg/nav/ rev/7fd8d71cd5d a