Skip to content

Commit aadb307

Browse files
authored
Additional index to improve performance for agents getting tasks (#1238)
* added combined index for chunk * updated changelog
1 parent e250f8e commit aadb307

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

doc/changelog.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
## Enhancements
44

55
- Added three more indexes in MySQL to improve the task view drastically (Note: these are not created on update due to performance issues, only on new installs)
6+
- Added an additional multi-column index in MySQL on the chunk table to increase performance for agents getting tasks (Note: these are not created on update due to performance issues, only on new installs)
67

78
# v0.14.3 -> v0.14.4
89

src/install/hashtopolis.sql

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1032,7 +1032,8 @@ ALTER TABLE `Chunk`
10321032
ADD PRIMARY KEY (`chunkId`),
10331033
ADD KEY `taskId` (`taskId`),
10341034
ADD KEY `progress` (`progress`),
1035-
ADD KEY `agentId` (`agentId`);
1035+
ADD KEY `agentId` (`agentId`),
1036+
ADD KEY `idx_task_progress_length` (`taskId`, `progress`, `length`);
10361037

10371038
ALTER TABLE `Config`
10381039
ADD PRIMARY KEY (`configId`),

0 commit comments

Comments
 (0)