Actions
Refactor #1955
openimprove host deletion speed
Status:
New
Priority:
Normal
Assignee:
-
Category:
-
Target version:
-
Description
Currently both facts and reports (and their log join) are deleted using dependent => :destroy
this costs a lot of time because:- each value is deleted in a single SQL
- each AR object is initiated.
possible solutions:
- use dependent => :destroy_all which would fix 2
- use delete_all to delete all id's in a single query (one for facts, one for reports and another for logs).
since we are not doing any auditing on facts currently, it might be save enough to use delete_all (and remove about 70% of the time it takes to delete a host).
Updated by Daniel Lobato Garcia about 10 years ago
- Related to Bug #8316: Removing a long-standing host creates huge transaction added
Actions