From b792b65f5e9625e858c6aae18556c8968465c886 Mon Sep 17 00:00:00 2001 From: Graham Date: Wed, 24 Mar 2021 18:46:46 +0000 Subject: [PATCH] Remove smarter resolution algorithm for now It's significantly slower. I'm not sure why yet. Signed-off-by: Graham --- .../openrs2/archive/migrations/V1__init.sql | 29 ------------------- 1 file changed, 29 deletions(-) diff --git a/archive/src/main/resources/org/openrs2/archive/migrations/V1__init.sql b/archive/src/main/resources/org/openrs2/archive/migrations/V1__init.sql index 4b3f3a86..3d84df36 100644 --- a/archive/src/main/resources/org/openrs2/archive/migrations/V1__init.sql +++ b/archive/src/main/resources/org/openrs2/archive/migrations/V1__init.sql @@ -168,21 +168,6 @@ CREATE FUNCTION resolve_index(master_index_id INTEGER, archive_id uint1, crc32 I DECLARE resolved containers%ROWTYPE; BEGIN - SELECT c.* - INTO resolved - FROM source_groups g - JOIN containers c ON c.id = g.container_id - JOIN indexes i ON i.container_id = c.id - JOIN sources s ON s.id = g.source_id - WHERE g.archive_id = 255 AND g.group_id = archive_id::INTEGER AND c.crc32 = crc32 AND g.version = version AND - NOT g.version_truncated AND i.version = version AND s.master_index_id = master_index_id - ORDER BY c.id ASC - LIMIT 1; - - IF FOUND THEN - RETURN resolved; - END IF; - SELECT c.* INTO resolved FROM groups g @@ -202,20 +187,6 @@ CREATE FUNCTION resolve_group(master_index_id INTEGER, archive_id uint1, group_i DECLARE resolved containers%ROWTYPE; BEGIN - SELECT c.* - INTO resolved - FROM source_groups g - JOIN containers c ON c.id = g.container_id - JOIN sources s ON s.id = g.source_id - WHERE g.archive_id = archive_id AND g.group_id = group_id AND c.crc32 = crc32 AND g.version = version AND - NOT g.version_truncated AND s.master_index_id = master_index_id - ORDER BY c.id ASC - LIMIT 1; - - IF FOUND THEN - RETURN resolved; - END IF; - SELECT c.* INTO resolved FROM groups g