Fix high CPU usage with overboard's catalog #134
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "ukko-catalog-sql-perf"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Right now it errors with
258e873706to9821a7420dThe query has a huge problem: it only counts the images in the OP
Currently the query at
33af676a8dis correct in isolation, however when used with the rest of the code, it causes a syntax error. Needs more investigation.As an additional idea: we should limit each posts_* subquery to the maximum number of posts the the overboard catalog will display
Issue seems to stem from vichan using A FUCKING REGEX to append the limit to the generated query.
Should be solved by using implode to generate the unified query and then append the limit.
a0c44eeb08to3db5c3c0943db5c3c094toec85705fb2So, mariadb doesn't seem to support in subqueries all the things that speed up the query...
Good news: we now almost sort-of semi have the code to distinguish which DB type we're running on.
We can run this only if we're using MySQL😁
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.