MYSQL performance wp_wc_users_voted
i noticed very slow response from wp-admin.
After debuging i noticed that there is query which which take around 13 sec to complete.
this is query
SELECT COUNT(*) FROM `wp_wc_users_voted` WHERE `user_id` LIKE '%.%' OR `user_id` LIKE '%:%'
Can you please tell me if I empty table wp_wc_users_voted will I lose a number of votes for comments or this table is just holding data to prevent user to double vote on some comments?
Could you please send the admin login details to info[at]gvectors.com email address to allow us to ceck and fix the issue?
The issue is fixed on your clone website. If you need to fix it on the real website please follow the steps below.
- Open the wp-content/plugins/wpdiscuz/class.WpdiscuzCore.php file
- Find the following line (line 121)
add_action('admin_notices', array(&$this->helper, 'hashVotesNote'));
- Comment out this line
-Thanks for your replay!
Can you tell me with never version this will be overwrite?
We'll fix this issue in the next version release. You will be able to update the wpDiscuz plugin without worries.
and one more question, it is from first post on this topic
If I empty table wp_wc_users_voted will I lose a number of votes for comments or this table is just holding data to prevent user to double vote on some comments?
I investigate on this and it holds an each vote per comment? I am right?
Currently, if you're not using the "separate count" value for the "Comment voting statistic mode" option and you've not installed the wpDiscuz Comment Author Info and wpDiscuz Comment Author Info addons, there won't be any problems if you empty wp_wc_users_voted table.
However, we don't recommend you to empty it. Probably in the future, you'll decide to use the separate count option or some add-ons.
Thanks for your kind replay.
Yes I am using separated count 🙂
One question is why do you write down each vote, and just one meta filed in comments meta table, with total negative and positive values?
are there any hooks or action which we can use to display data and on vote to update this metafields (if we try to do some own solution)
Could you please show the indexes of wp_wc_users_voted table fields? And, please let us know what MySQL version you use? Also, please make sure this table engine is InnoDB.
You should add the changes one more time. The last update doesn't include that part. This will be included in the new major version of wpDiscuz (no ETA).
The steps you should do: