From 6aa13394a12c1931990b91e62210cba72706920d Mon Sep 17 00:00:00 2001
From: fusion32 <marcopuzziello@gmail.com>
Date: Mon, 27 Oct 2025 21:44:13 -0300
Subject: adjust character death indexes for common queries

---
 postgres/schema.sql | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

(limited to 'postgres/schema.sql')

diff --git a/postgres/schema.sql b/postgres/schema.sql
index 08837c5..bce1b35 100644
--- a/postgres/schema.sql
+++ b/postgres/schema.sql
@@ -109,8 +109,9 @@ CREATE TABLE CharacterDeaths (
     Unjustified BOOLEAN NOT NULL,
     Timestamp TIMESTAMPTZ NOT NULL
 );
-CREATE INDEX CharacterDeathsCharacterIndex ON CharacterDeaths(CharacterID, Level);
-CREATE INDEX CharacterDeathsOffenderIndex  ON CharacterDeaths(OffenderID, Unjustified);
+CREATE INDEX CharacterDeathsCharacterIndex ON CharacterDeaths(CharacterID, Timestamp);
+CREATE INDEX CharacterDeathsOffenderIndex  ON CharacterDeaths(OffenderID, Timestamp);
+CREATE INDEX CharacterDeathsTimeIndex      ON CharacterDeaths(Timestamp);
 
 CREATE TABLE Buddies (
     WorldID INTEGER NOT NULL,
-- 
cgit v1.2.3

