Skip to content
This repository has been archived by the owner on Dec 15, 2018. It is now read-only.

Commit

Permalink
Add index to Task.status
Browse files Browse the repository at this point in the history
Summary:
We have monitoring and clean-up tasks that engage in table scans because they primarily care about
status; this is currently triggering our long-query warnings and creating noise.
Hopefully an index fixes that.
This is the same as 8c49ac5 but not concurrent.

Test Plan: None

Reviewers: naphat

Reviewed By: naphat

Subscribers: changesbot, anupc

Differential Revision: https://tails.corp.dropbox.com/D233891
  • Loading branch information
kylec1 committed Oct 4, 2016
1 parent 159a041 commit 3523796
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions migrations/versions/181adec926e2_add_status_index_to_task.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
"""Add status index to task
Revision ID: 181adec926e2
Revises: 43397e521791
Create Date: 2016-10-03 17:41:44.038137
"""

# revision identifiers, used by Alembic.
revision = '181adec926e2'
down_revision = '43397e521791'

from alembic import op


def upgrade():
op.create_index('idx_task_status', 'task', ['status'], unique=False)


def downgrade():
op.drop_index('id_task_status', table_name='task')

0 comments on commit 3523796

Please sign in to comment.