You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
On page cache expiration (happening after every edit or currently even when a user locks a page by clicking on "edit"), page categories are looked up. An example query is:
SELECT DISTINCTwiki_references.referenced_nameFROM wiki_references LEFT OUTER JOIN pages ONwiki_references.page_id=pages.idWHEREwiki_references.link_type='C'ANDpages.web_id='1';
For larger wikis, this is really slow (3-4s in the case of the nlab), even if there are few pages that live in page categories.
A reason for the slowness is that the table wiki_references doesn't have an index for link_types.
Creating this index solves the problem:
MariaDB [nlab]> create index index_wiki_references_on_link_type on wiki_references (link_type);
Query OK, 10072562 rows affected (2 min 10.78 sec)
Records: 10072562 Duplicates: 0 Warnings: 0
(A more principled solution would be to have a table for page categories.)
The text was updated successfully, but these errors were encountered:
On page cache expiration (happening after every edit or currently even when a user locks a page by clicking on "edit"), page categories are looked up. An example query is:
For larger wikis, this is really slow (3-4s in the case of the nlab), even if there are few pages that live in page categories.
A reason for the slowness is that the table wiki_references doesn't have an index for link_types.
Creating this index solves the problem:
(A more principled solution would be to have a table for page categories.)
The text was updated successfully, but these errors were encountered: