Skip to content

Commit

Permalink
TRY-321: add indexes to optimize embeddings fetching by subject name
Browse files Browse the repository at this point in the history
  • Loading branch information
ivan-kripakov-m10 committed Jun 14, 2024
1 parent 6a6601e commit b68df89
Show file tree
Hide file tree
Showing 4 changed files with 46 additions and 0 deletions.
21 changes: 21 additions & 0 deletions java/admin/src/main/resources/db/changelog/db.changelog-0.2.4.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
databaseChangeLog:
- changeSet:
id: create-indexes-on-embeddings
author: [email protected]
changes:
- createIndex:
tableName: embeddings
columns:
- column:
name: subject_id
indexName: embeddings_subject_id_idx
- changeSet:
id: create-index-on-image-attributes
author: [email protected]
changes:
- createIndex:
tableName: image_attributes
columns:
- column:
name: image_id
indexName: image_attributes_image_id_idx
Original file line number Diff line number Diff line change
Expand Up @@ -45,3 +45,5 @@ databaseChangeLog:
file: db/changelog/db.changelog-0.2.2.yaml
- include:
file: db/changelog/db.changelog-0.2.3.yaml
- include:
file: db/changelog/db.changelog-0.2.4.yaml
21 changes: 21 additions & 0 deletions java/api/src/test/resources/db/changelog/db.changelog-0.2.4.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
databaseChangeLog:
- changeSet:
id: create-indexes-on-embeddings
author: [email protected]
changes:
- createIndex:
tableName: embeddings
columns:
- column:
name: subject_id
indexName: embeddings_subject_id_idx
- changeSet:
id: create-index-on-image-attributes
author: [email protected]
changes:
- createIndex:
tableName: image_attributes
columns:
- column:
name: image_id
indexName: image_attributes_image_id_idx
Original file line number Diff line number Diff line change
Expand Up @@ -45,3 +45,5 @@ databaseChangeLog:
file: db/changelog/db.changelog-0.2.2.yaml
- include:
file: db/changelog/db.changelog-0.2.3.yaml
- include:
file: db/changelog/db.changelog-0.2.4.yaml

0 comments on commit b68df89

Please sign in to comment.