-
Notifications
You must be signed in to change notification settings - Fork 96
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
Optimise queries #31
Optimise queries #31
Conversation
77d581d
to
674672f
Compare
07b0482
to
dbfd681
Compare
It seems that there is race condition in test suite which causes the problems with build passing. |
566118d
to
cfd0b4f
Compare
It will be hard for me to increase coverage in this PR as the decrease is due to fact that I have removed bunch of lines and that caused overall coverage fall, each separate file coverage is left as is. |
.tool-versions
Outdated
@@ -0,0 +1 @@ | |||
elixir 1.6.1 |
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.
This should not be commited since we can’t assume what the developer will use to manage elixir and erlang dependancies.
Inner join is default join for Ecto for valid reasons, it helps DB optimizer to reduce amount of tuples fetched from storage.
A lot of indices through whole DB were missing. While some of them are overlapping with existing mutlicolumn indices the order of columns is wrong, as most specific ones are first and least specific (and by that most used) are last which mean that DB cannot use them in queries.
Trigram indices are built-in extension to PostgreSQL which greatly improve non-contextual text search queries where search query is longer than 3 characters by building index of 3 characters blocks in each entry. As this is built-in this do not require any additional installation.
Old way required 2 DB queries, where one would be sufficient.
All requests resolved. |
This is overall review of the DB status. More details in commit messages.