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

Merge indexes for reblog on statuses table #5831

Merged
merged 1 commit into from
Nov 27, 2017

Conversation

unarist
Copy link
Contributor

@unarist unarist commented Nov 27, 2017

We recently added an index for [account_id, reblog_of_id] at #5785, but we already have a similar index for reblog_of_id. Those index will be bigger according to statuses count. For example, reblog_of_id index uses 800MB for 10GB statuses table.

So this patch swaps indexed columns like [reblog_of_id, account_id], then it will covers both usage with single index.

Since those index creation may take a while, I've also disabled previous index creation.

cc @abcang

We added an index for `[account_id, reblog_of_id]`, but we already have a similar index for `reblog_of_id`. Those index will be bigger according to statuses count. For example, `reblog_of_id` index uses 800MB for 10GB statuses table.

So this patch swaps indexed columns like `[reblog_of_id, account_id]`, then it will covers both usage with single index.

Since those index creation may take a while, I've also disabled previous index creation.
@Gargron Gargron merged commit 7fb850e into mastodon:master Nov 27, 2017
cobodo pushed a commit to cobodo/mastodon that referenced this pull request Dec 6, 2017
We added an index for `[account_id, reblog_of_id]`, but we already have a similar index for `reblog_of_id`. Those index will be bigger according to statuses count. For example, `reblog_of_id` index uses 800MB for 10GB statuses table.

So this patch swaps indexed columns like `[reblog_of_id, account_id]`, then it will covers both usage with single index.

Since those index creation may take a while, I've also disabled previous index creation.
abcang pushed a commit to pixiv/mastodon that referenced this pull request Dec 18, 2017
We added an index for `[account_id, reblog_of_id]`, but we already have a similar index for `reblog_of_id`. Those index will be bigger according to statuses count. For example, `reblog_of_id` index uses 800MB for 10GB statuses table.

So this patch swaps indexed columns like `[reblog_of_id, account_id]`, then it will covers both usage with single index.

Since those index creation may take a while, I've also disabled previous index creation.
@unarist unarist deleted the fix/merge-reblog-indexes branch September 29, 2018 07:40
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