Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
+5 votes
678 views
in Q2A Core by

I have never used the tables:

- qa_sharedevents
- qa_userevents

and would like to know if anyone ever had a usecase for that?

In my recent opinion, those are useless tables from application/usability perspective (but I hope I am wrong).

---

Related: https://www.question2answer.org/qa/50039/needed-option-disable-the-question-user-event-updates-core

Q2A version: 1.8.3
by
To disabled the sharedevents logging, either write a plugin and override function qa_db_event_create_for_entity() and qa_db_favorite_create(). Or core hack: /db/events.php and /db/favorites.php (where you leave the first INSERT IGNORE alive).

1 Answer

+4 votes
by
Those tables are used to store activity on questions for user favorites. So if you favorite a question, each answer/comment on it will get put in the qa_userevents table so it can be shown on your "My Updates" page.

The qa_sharedevents table is used when many users have favorited the same question. For example if 20 people favorited the same question, a new answer could add 20 rows to userevents, so instead it adds 1 to sharedevents.

See the big comment in qa-include/db/favorites.php for a full technical explanation. And yes they do get used - my site has 50k+ rows in each of the tables.
by
edited by
+1
Only major issue is that nobody is using the "My Updates" page... and server resources are used for nothing.
by
+1
I use it all the time and I know people on my site also use it. But it may become obsolete when I finally get around to adding notifications to Q2A.

In the meantime there may be some way to prevent it if you can find the function that stores all the updates and make an override plugin that skips them all.
...