Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@yamashush
Copy link

@yamashush yamashush commented Sep 1, 2023

背景

🎫 詳細はチケット https://smarthr.atlassian.net/browse/CPEN-1942

実行に60〜90secかかっているクエリがあって、深刻なパフォーマンス低下を引き起こしているのでチューニングします。
原因は、10^6〜10^7レコードが存在するRevisionテーブルをselectする際にシーケンシャルスキャンになっているため。
where条件的に、noteIdカラムにインデックスを追加すれば解消すると思います。
もし改善しなければ他のチューニング手段を考えます。

stagingでは動作確認して、凪の状態で20〜30秒かかっていたものが1秒未満で完了する状態にはなっています。

image

@yamashush yamashush requested review from shigerix and u1ymd September 1, 2023 01:10
@yamashush yamashush self-assigned this Sep 1, 2023
Copy link

@shigerix shigerix left a comment

Choose a reason for hiding this comment

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

:arigatau:

js でこの辺制御してるんすね!

@yamashush yamashush merged commit da7b602 into master-smarthr Sep 1, 2023
@yamashush yamashush changed the title 実行に60〜90秒を要しているクエリのチューニング 🔧 実行に60〜90秒を要しているクエリのチューニング Sep 1, 2023
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.

3 participants