Improve performance by putting 'views' fields in separate tables. Currently every time a user views an Author page the software updates 2 counters in the author table. When a user views a Title page, 2 counters are updated in the title table. This results in a mix of reads and writes from the same table during regular ISFDB operations. It causes a problem when users run Title searches because, as per https://http://books.gigatux.nl/mirror/mysqlcertification/0672326329/ch14lev1sec3.html:
Every time a user runs a Title search and another user requests an Author or Title page, this scenario occurs and everyone else gets locked until the Title search finishes.
The solution is to move the "view" counters from the author table and the title table to separate tables.
Anonymous
Implemented in:
Installed in SVN 996 on 2022-09-10. Closing the FR.
Part 2 - Accounted for the changed syntax in MySQL 8.0. Implemented in nightly/database_stats.py, installed in SVN 1000 on 2022-09-11.