-
Notifications
You must be signed in to change notification settings - Fork 13k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add index on the query table on the result key column
- Loading branch information
Bogdan Kyryliuk
committed
Jan 24, 2017
1 parent
6e5eed8
commit a7ff828
Showing
2 changed files
with
21 additions
and
1 deletion.
There are no files selected for viewing
20 changes: 20 additions & 0 deletions
20
superset/migrations/versions/f18570e03440_add_query_result_key_index.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,20 @@ | ||
"""Add index on the result key to the query table. | ||
Revision ID: f18570e03440 | ||
Revises: 1296d28ec131 | ||
Create Date: 2017-01-24 12:40:42.494787 | ||
""" | ||
from alembic import op | ||
|
||
# revision identifiers, used by Alembic. | ||
revision = 'f18570e03440' | ||
down_revision = '1296d28ec131' | ||
|
||
|
||
def upgrade(): | ||
op.create_index(op.f('ix_query_results_key'), 'query', ['results_key'], unique=False) | ||
|
||
|
||
def downgrade(): | ||
op.drop_index(op.f('ix_query_results_key'), table_name='query') |
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