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

Add index for admin #8

Merged
merged 3 commits into from Jul 23, 2022
Merged

Add index for admin #8

merged 3 commits into from Jul 23, 2022

Conversation

odanado
Copy link
Owner

@odanado odanado commented Jul 23, 2022

No description provided.

@@ -2,3 +2,6 @@ DELETE FROM tenant WHERE id > 100;
DELETE FROM visit_history WHERE created_at >= '1654041600';
UPDATE id_generator SET id=2678400000 WHERE stub='a';
ALTER TABLE id_generator AUTO_INCREMENT=2678400000;

-- 時間がかかるので別で実行済み
-- ALTER TABLE visit_history ADD INDEX tenant_competition_player_idx (tenant_id, competition_id, player_id);
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

initialize 時に実行すると timeout するので事前に実行しておくこと、としました

@odanado
Copy link
Owner Author

odanado commented Jul 23, 2022

スコアは2443とあまり変わらず...
https://portal.isucon.net/contestant/benchmark_jobs/8984

クエリ自体は21secかかっていたものが最大でも300msになったので改善しているはず

@odanado odanado merged commit 93fe582 into main Jul 23, 2022
@odanado odanado deleted the add-index-for-admin branch July 23, 2022 04:10
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

1 participant