Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

store/postgres: Add an index on event_meta_data(source) #945

Merged
merged 1 commit into from May 15, 2019

Conversation

lutter
Copy link
Collaborator

@lutter lutter commented May 14, 2019

We find event_meta_data during block reversions by the source attribute,
and not having an index on it slows down those queries, and therefore block
reversion, dramatically. In one case, query time for a block reversion goes
from 18s to 5ms after adding the index.

@ghost ghost assigned lutter May 14, 2019
@ghost ghost added the pending review label May 14, 2019
@lutter
Copy link
Collaborator Author

lutter commented May 14, 2019

Building this index in production will take about 3 minutes.

@lutter
Copy link
Collaborator Author

lutter commented May 14, 2019

I actually just added the index manually to production so that rolling this out won't slow down startup

We find event_meta_data during block reversions by the source attribute,
and not having an index on it slows down those queries, and therefore block
reversion, dramatically. In one case, query time for a block reversion goes
from 18s to 5ms after adding the index.
@lutter lutter merged commit e604f3c into master May 15, 2019
@ghost ghost removed the pending review label May 15, 2019
@lutter lutter deleted the lutter/source branch May 17, 2019 21:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants