andk / pause

Perl authors upload server
http://pause.perl.org/
150 stars 57 forks source link

Add lc_package columns to avoid timeout/deadlock #440

Closed charsbar closed 4 months ago

charsbar commented 4 months ago

This PR is another fix for #406. Contrary to #424, which removes LOWER() so that PAUSE can use indices (but lose case-insensitivity), this PR adds indexed lc_package columns to keep the current case-insensitive search and let PAUSE use indices at the cost of some extra space.

We may need to replace some more for the web app, but I haven't thoroughly checked yet. Also, we may need to add a unique lc_pack_user index (or replace pack_user with lc_pack_user), but I'm still wondering which is better.

If you try this PR before merging, apply one-off-utils/schemachange-2024-04.sql.

andk commented 4 months ago

Thanks, applied and deployed just now