Separate out action key index from location to speed up lookups
Hello there!
Yet another PR from me with some SQL index voodoo magick to help speedup lookups! Like my first PR #194, I am highly confident this PR will only bring about sunshines and rainbows to the performance of Prism.
In a nutshell, there is no reason for the action_id column to be in the same index as the location-based columns. By separating it out into it's own index, the performance gain is exponential. A simple command like /pr lookup a:command t:1y r:global can take about 5 seconds on my server, as compared to more than 15 minutes (before I killed it) without this indexing key!
Unfortunately, because of the way the database engine works, there is no way to modify an existing index, so I tried to take the approach of deleting the whole index location and re-creating it with the correct location-y columns. This may be the most expensive part about this PR, but I believe this change makes the most logical sense and should be carried out!
Here is an overview of what got changed by this pull request:
Issues
======
- Added 1
See the complete overview on Codacy
What's the status of this PR? Is this abandoned?
It needs testing on a large dataset until someone has done that and provided the stats its stagnant
It needs testing on a large dataset until someone has done that and provided the stats its stagnant
Sounds good. I'll jump on this soon 👍
This repository is no longer active. You can try to resubmit this at the current Prism repo here https://github.com/prism/PrismRefracted (although, some of these older fix PRs were already adapted, please verify first)