-
Notifications
You must be signed in to change notification settings - Fork 58
Optimize the search action #323
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
base: master
Are you sure you want to change the base?
Optimize the search action #323
Conversation
What database are you using to observe these differences? I believe when I looked into optimizing some of these queries I used sqlite, which properly optimized the join queries. Ledger already has a cache for all "secondary" tables to optimize inserts. I have implemented a similar approach to this PR using these caches (to remove the |
We are using MySQL (especially MariaDB)
We will look into that and I'll come back to you! Thank you for the answer (and sorry for the slow answer from me) |
@fantomitechno did you look into this? |
@DrexHD I didn't have time but I'm gonna test it tomorrow! |
@DrexHD I was able to test and so I can confirm that it's as fast as my proposition! |
After more usage, we encountered this error log that we didn't get with our PR nor with "normal" Ledger
The commands that created this issue were |
Should be fixed by f1fcd84! |
On big databases, the search action is very very slow .
On our 2 years running survival server, we waited more than 15 minutes for a
/lg search source:fantomitechno
with no answers.We tested this PR on our big database and the same command now run in less than 10 seconds.
We replaced the multiple joins by checks on each Tables and matching the found indexes on the Action table.