-
Notifications
You must be signed in to change notification settings - Fork 47
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
homework 8 #42
base: master
Are you sure you want to change the base?
homework 8 #42
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎉
@@ -0,0 +1,40 @@ | |||
## О проекте | |||
Проект является одним из энджинов для вэб-казино. Выполняет роль как админки для конфигурации игр, так и непосредственно backend логики этих игр. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎰
|
||
`created_at = attributes.fetch(:some_key) { Account.find(...)&.created_at }` | ||
|
||
Таким образом образом избавился от большого количества ненужных запросов. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 да-да, без мониторинга никогда не догадаешься что это это какая-то проблемная строка
Пока не довел коммит до production, но по моим подсчетам только за счет этой | ||
оптимизации нагрузка на базу снизится на от 30% до 40%. | ||
*** | ||
В планах исследовать на досуге другие нагруженные транзакции. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
|
||
Таким образом образом избавился от большого количества ненужных запросов. | ||
Пока не довел коммит до production, но по моим подсчетам только за счет этой | ||
оптимизации нагрузка на базу снизится на от 30% до 40%. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
поменяли пару символов в одной строке -> убрали 40% запросов, люблю такое
вспоминаю в таких случаях анекдот про механика, который починил что-то одним ударом гаечного ключа и запросил 10к долларов за работу. На запрос о детализации счёта ответил так:
- удар - 1$
- знать куда ударить - 9999$
No description provided.