-
-
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
Improve performance of advanced map list #995
base: master
Are you sure you want to change the base?
Conversation
The advanced map list used to retrieve the records from the database by performing two database queries per map in a loop over all maps. This commit changes this to one big query to the database that gets performed outside of the loop.
This method has only one minor issue: it requires so new mysql/mariadb that many don't just have it. |
For me it seems that only MySQL is blocking this and I haven't tested PostgreSQL yet, but it should work. The docs show examples comparable to my query: https://www.postgresql.org/docs/current/tutorial-window.html Maybe we can detect the DB version and only use this code if the DB is recent enough? |
Yeah, let me see my mariadb version for reference since only when updating the very newest one started to work. And even i have such old mysql, how many else has :) |
This isn't supported by most versions yet indeed:
You could do the 'old style' for older MySQL servers, you can most likely obtain the version of the MySQL server with the client. |
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.
Doesn't support older MySQL versions.
Motivation or cause
See #994
Change description
The advanced map list used to retrieve the records from the database by
performing two database queries per map in a loop over all maps. This
commit changes this to one big query to the database that gets performed
outside of the loop.
Checklist of pull request
Make sure that your pull request follow the following 'rules':
Makefile
resulted in an error.Additional Comments (optional)
This PR contains the first version of the implementation and I am still not completely happy with it, but also want to get feedback on the general approach.