-
Notifications
You must be signed in to change notification settings - Fork 1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
by adding an index on extension. Fixes extremely slow tool form building.
- Loading branch information
Showing
2 changed files
with
34 additions
and
1 deletion.
There are no files selected for viewing
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
33 changes: 33 additions & 0 deletions
33
lib/galaxy/model/migrations/alembic/versions_gxy/55f02fd8ab6c_add_index_on_hda_extension.py
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,33 @@ | ||
"""Add index on history_dataset_association extension | ||
Check failure on line 1 in lib/galaxy/model/migrations/alembic/versions_gxy/55f02fd8ab6c_add_index_on_hda_extension.py GitHub Actions / Test (3.8)
|
||
Revision ID: 55f02fd8ab6c | ||
Revises: 2dc3386d091f | ||
Create Date: 2024-03-25 11:14:40.005394 | ||
""" | ||
|
||
from galaxy.model.database_object_names import build_index_name | ||
from galaxy.model.migrations.util import ( | ||
create_index, | ||
drop_index, | ||
) | ||
|
||
|
||
# revision identifiers, used by Alembic. | ||
revision = "55f02fd8ab6c" | ||
down_revision = "2dc3386d091f" | ||
branch_labels = None | ||
depends_on = None | ||
|
||
|
||
hda_table_name = "history_dataset_association" | ||
hda_extension_column_name = "extension" | ||
hda_extension_index_name = build_index_name(hda_table_name, hda_extension_column_name) | ||
|
||
|
||
def upgrade(): | ||
create_index(hda_extension_index_name, hda_table_name, [hda_extension_column_name]) | ||
|
||
|
||
def downgrade(): | ||
drop_index(hda_extension_index_name, hda_table_name) |