mirror of
https://github.com/ysoftdevs/DependencyCheck.git
synced 2026-03-28 20:02:16 +01:00
Optimized CLEANUP_ORPHANS query for H2 1.4.x
Original query from dbStatements.properties writes millions of records from subselect to file system due to MAX_MEMORY_ROWS Setting http://www.h2database.com/html/grammar.html?highlight=max_memory_rows&search=MAX_MEM#set_max_memory_rows Database maintenance task therefore takes forever. The new query (copied from postgresql) works way faster.
This commit is contained in:
@@ -13,3 +13,4 @@
|
|||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
MERGE_PROPERTY=MERGE INTO properties (id, value) KEY(id) VALUES(?, ?)
|
MERGE_PROPERTY=MERGE INTO properties (id, value) KEY(id) VALUES(?, ?)
|
||||||
|
CLEANUP_ORPHANS=DELETE FROM cpeEntry WHERE id IN (SELECT id FROM cpeEntry LEFT JOIN software ON cpeEntry.id = software.CPEEntryId WHERE software.CPEEntryId IS NULL)
|
||||||
|
|||||||
Reference in New Issue
Block a user