-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
* Fixes #16788 : Fix feed and count api query performance * Fixes #16788 : Fix feed and count api query performance * Fixes #16788 : Fix feed and count api query performance * postgres fixes * rename thread_entity indexes
- Loading branch information
1 parent
f1efe53
commit 88265ec
Showing
5 changed files
with
153 additions
and
58 deletions.
There are no files selected for viewing
Empty file.
21 changes: 21 additions & 0 deletions
21
bootstrap/sql/migrations/native/1.4.5/mysql/schemaChanges.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
ALTER TABLE thread_entity | ||
ADD COLUMN hash_id VARCHAR(32) GENERATED ALWAYS AS (MD5(id)) STORED; | ||
CREATE INDEX idx_thread_entity_hash_id ON thread_entity(hash_id); | ||
|
||
ALTER TABLE thread_entity | ||
ADD COLUMN testCaseResolutionStatusId VARCHAR(255) | ||
GENERATED ALWAYS AS (JSON_UNQUOTE(JSON_EXTRACT(json, '$.task.testCaseResolutionStatusId'))) STORED; | ||
CREATE INDEX idx_testCaseResolutionStatusId ON thread_entity (testCaseResolutionStatusId); | ||
|
||
CREATE INDEX idx_entity_relationship_fromEntity_fromId_relation | ||
ON entity_relationship (fromEntity, fromId, relation); | ||
|
||
CREATE INDEX idx_field_relationship_from ON field_relationship (fromType, fromFQNHash, toType, relation); | ||
CREATE INDEX idx_field_relationship_to ON field_relationship (fromType, toFQNHash, toType, relation); | ||
|
||
|
||
CREATE INDEX idx_entity_id ON thread_entity (entityId); | ||
|
||
CREATE INDEX idx_type_task_status ON thread_entity (type, taskStatus); | ||
|
||
|
Empty file.
18 changes: 18 additions & 0 deletions
18
bootstrap/sql/migrations/native/1.4.5/postgres/schemaChanges.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
ALTER TABLE thread_entity | ||
ADD COLUMN hash_id VARCHAR(32) | ||
GENERATED ALWAYS AS (MD5(json ->> 'id')) STORED; | ||
CREATE INDEX idx_thread_entity_hash_id ON thread_entity(hash_id); | ||
|
||
ALTER TABLE thread_entity | ||
ADD COLUMN testCaseResolutionStatusId TEXT GENERATED ALWAYS AS (json -> 'task' ->> 'testCaseResolutionStatusId') STORED; | ||
CREATE INDEX idx_testCaseResolutionStatusId ON thread_entity (testCaseResolutionStatusId); | ||
|
||
CREATE INDEX idx_entity_relationship_fromEntity_fromId_relation | ||
ON entity_relationship (fromEntity, fromId, relation); | ||
|
||
CREATE INDEX idx_field_relationship_from ON field_relationship (fromType, fromFQNHash, toType, relation); | ||
CREATE INDEX idx_field_relationship_to ON field_relationship (fromType, toFQNHash, toType, relation); | ||
|
||
CREATE INDEX idx_entity_id ON thread_entity (entityId); | ||
|
||
CREATE INDEX idx_type_task_status ON thread_entity (type, taskStatus); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters