From 9bce5cc1b3dd1f28804c875a7783b556c19f9d43 Mon Sep 17 00:00:00 2001 From: Graham Date: Sun, 21 Mar 2021 11:39:17 +0000 Subject: [PATCH] Replace LEFT JOIN on sources/games with a JOIN Each master index now has at least one source. Signed-off-by: Graham --- .../kotlin/org/openrs2/archive/cache/CacheExporter.kt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/archive/src/main/kotlin/org/openrs2/archive/cache/CacheExporter.kt b/archive/src/main/kotlin/org/openrs2/archive/cache/CacheExporter.kt index 39cf69bbfb..4ad99f6b10 100644 --- a/archive/src/main/kotlin/org/openrs2/archive/cache/CacheExporter.kt +++ b/archive/src/main/kotlin/org/openrs2/archive/cache/CacheExporter.kt @@ -88,8 +88,8 @@ public class CacheExporter @Inject constructor( ms.valid_keys, ms.keys FROM master_indexes m - LEFT JOIN sources s ON s.master_index_id = m.id - LEFT JOIN games g ON g.id = s.game_id + JOIN sources s ON s.master_index_id = m.id + JOIN games g ON g.id = s.game_id LEFT JOIN master_index_stats ms ON s.master_index_id = m.id GROUP BY m.id, g.name, ms.valid_indexes, ms.indexes, ms.valid_groups, ms.groups, ms.valid_keys, ms.keys ORDER BY g.name ASC, MIN(s.build) ASC, MIN(s.timestamp) ASC @@ -153,8 +153,8 @@ public class CacheExporter @Inject constructor( ms.valid_keys, ms.keys FROM master_indexes m - LEFT JOIN sources s ON s.master_index_id = m.id - LEFT JOIN games g ON g.id = s.game_id + JOIN sources s ON s.master_index_id = m.id + JOIN games g ON g.id = s.game_id LEFT JOIN master_index_stats ms ON s.master_index_id = m.id WHERE m.id = ? GROUP BY m.id, ms.valid_indexes, ms.indexes, ms.valid_groups, ms.groups, ms.valid_keys, ms.keys