#1479 use better index for sessions
Merged 3 years ago by mikem. Opened 3 years ago by tkopecek.
tkopecek/koji issue1372  into  master

@@ -8,5 +8,7 @@ 

  UPDATE archivetypes SET extensions = 'tar tar.gz tar.bz2 tar.xz tgz' WHERE name = 'tar';

  INSERT INTO archivetypes (name, description, extensions) VALUES ('vhdx', 'Hyper-V Virtual Hard Disk v2 image', 'vhdx');

  

+ -- add better index for sessions

+ CREATE INDEX sessions_expired ON sessions(expired);

  

  COMMIT;

file modified
+1
@@ -118,6 +118,7 @@ 

  ) WITHOUT OIDS;

  CREATE INDEX sessions_master ON sessions(master);

  CREATE INDEX sessions_active_and_recent ON sessions(expired, master, update_time) WHERE (expired IS NOT TRUE AND master IS NULL);

+ CREATE INDEX sessions_expired ON sessions(expired);

  

  -- Channels are used to limit which tasks are run on which machines.

  -- Each task is assigned to a channel and each host 'listens' on one