Skip to content

Commit

Permalink
Add database indices
Browse files Browse the repository at this point in the history
Based on review of WHERE clauses in DAO queries

Partially address recent downtime issue due to DB connection pool saturation
  • Loading branch information
abought committed Oct 27, 2023
1 parent 6af509a commit 72adefa
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/main/sql/updates.sql
Original file line number Diff line number Diff line change
Expand Up @@ -168,4 +168,12 @@ alter table job add column user_agent VARCHAR (400);


-- 2.6.0
alter table `user` add column api_token_expires_on timestamp null default null;
alter table `user` add column api_token_expires_on timestamp null default null;

-- 2.7.1
CREATE INDEX idx_downloads_hash ON downloads(hash);
CREATE INDEX idx_downloads_path ON downloads(path);

CREATE INDEX idx_user_username ON user(username);
CREATE INDEX idx_user_mail ON user(mail);
CREATE INDEX idx_user_fullname ON user(full_name);

0 comments on commit 72adefa

Please sign in to comment.