Slow forum access, @Milo (Technics)

by Auge ⌂ @, Sunday, March 19, 2017, 17:56 (246 days ago) @ Milo
edited by Auge, Sunday, March 19, 2017, 18:04

Hello Milo

Yesss, triggers.

Maybe, my suggestion was over-hasted because I take a (very) short look into the source code. Of course, there are some SQLs that starts with SELECT COUNT(*) ... but there are several WHERE-conditions.

My question referred only to the forum wide counting of entries. There are further, differing cases. Those was not objective of my question.

How to handle these conditions?

You are right. The conditions are there not without a reason. Counting the entries of the forum can't be done in one variable if the current behaviour should be kept. There might be for some visitors hidden categories (categories only for registered users, categories only for admins and mods). Currently they are not taken into account in the counting for users without permissions.

1. We can count the entries once a day and live with the imprecision over the day.
2. We can count the entries once a day and summate the count of postings of the day.
3. We can count all entries together live (everytime a new entry is posted) without remarking the category of the entries.
4. We can count the entries per category and summate the entries in the categories with help of the access informations from the categories table.

The first three solutions abdicate the separate counting of special categories. No one will die in consequence but we would give up a (small) feature most visitors never notices. The fourth solution is the sophisticated one. It would be no problem to have more than one counter. But there are also questions for this scenario.

- How to count entries in a forum without categories?
- How to handle the count of entries in a forum without categories when the admin creates categories and moves entries into these new categories?
- How to handle the count of entries in categories in a forum where the admin deletes one, a few or all categories?

Not, that these questions are not answerable, but these questions must be asked.

Tschö, Auge

further development of mlf1

Complete thread:

 RSS Feed of thread

powered by my little forum