Deleting a netbox is extremely slow
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Network Administration Visualized |
Confirmed
|
Undecided
|
Unassigned |
Bug Description
This has been known for some time, but we need a bug number to reference it.
Deleting a row from the Netbox table will cascade to almost every other table in the system; sometime just to delete relations, sometimes to update timestamps or null out relations, such as in the case of the Cam table.
A switch that has been logging cam records for a while may have amassed millions of rows in the Cam table, unless this has been cleaned. Since we don't delete historical records, the netbox foreign key in Cam is just nulled out. This means updating millions of rows. This can be extremely time consuming.
There may not be much we can do to speed up this process in the way of database redesign, and it may not be worth the effort, considering that deleting a netbox is something a user would do rather seldom
The problem is mostly that of the user experience in SeedDB, where the page will seem to take forever to load after pressing the Confirm-button of a delete operation. The best solution may be to defer the actual deletion to a background task.
security vulnerability: | no → yes |
Fredrik, what?