MYSQL performance w...
 
Notifications

MYSQL performance wp_wc_users_voted  

  RSS

dnikola
(@dnikola)
Active Member
Joined: 7 months ago
Posts: 11
07/09/2019 2:29 pm  

Hi,

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? 

 

Regards!

This topic was modified 7 months ago by dnikola

Quote
Astghik
(@astghik)
Support Team Admin
Joined: 2 years ago
Posts: 3767
09/09/2019 4:09 pm  

Hi @dnikola,

Could you please send the admin login details to info[at]gvectors.com email address to allow us to ceck and fix the issue? 


ReplyQuote
Astghik
(@astghik)
Support Team Admin
Joined: 2 years ago
Posts: 3767
10/09/2019 12:42 pm  

Hi @dnikola,

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

ReplyQuote
dnikola
(@dnikola)
Active Member
Joined: 7 months ago
Posts: 11
10/09/2019 12:55 pm  

-Thanks for your replay!

 

Can you tell me with never version this will be overwrite? 

 

 


ReplyQuote
Astghik
(@astghik)
Support Team Admin
Joined: 2 years ago
Posts: 3767
10/09/2019 12:57 pm  

@dnikola

We'll fix this issue in the next version release. You will be able to update the wpDiscuz plugin without worries. 


ReplyQuote
dnikola
(@dnikola)
Active Member
Joined: 7 months ago
Posts: 11
10/09/2019 12:59 pm  

Great.

Thanks. 


ReplyQuote
dnikola
(@dnikola)
Active Member
Joined: 7 months ago
Posts: 11
10/09/2019 1:01 pm  

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?


ReplyQuote
Astghik
(@astghik)
Support Team Admin
Joined: 2 years ago
Posts: 3767
11/09/2019 1:46 pm  

@dnikola

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. 


ReplyQuote
dnikola
(@dnikola)
Active Member
Joined: 7 months ago
Posts: 11
11/09/2019 1:57 pm  

Hi @astghik

Thanks for your kind replay. 

Yes I am using separated count Smile

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)

 

Thanks!


ReplyQuote
dnikola
(@dnikola)
Active Member
Joined: 7 months ago
Posts: 11
13/11/2019 6:35 pm  

Hello

 

I have same problem again 

 

http://prntscr.com/pwfnyr

 

 


ReplyQuote
Tom
 Tom
(@tomson)
Support Team Admin
Joined: 5 years ago
Posts: 3112
13/11/2019 7:05 pm  

Hi @dnikola

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.


ReplyQuote
dnikola
(@dnikola)
Active Member
Joined: 7 months ago
Posts: 11
13/11/2019 7:14 pm  

Hi

please check this info and let me know if you need more

 

http://prntscr.com/pwgadz

http://prntscr.com/pwgd23

http://prntscr.com/pwgdfo

 


ReplyQuote
dnikola
(@dnikola)
Active Member
Joined: 7 months ago
Posts: 11
02/12/2019 6:14 pm  

any news?


ReplyQuote
Elvina
(@elvina)
Honorable Member Moderator
Joined: 7 months ago
Posts: 680
03/12/2019 3:40 pm  

@dnikola,

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: 

https://gvectors.com/forum/wpdiscuz-comment-plugin-support/mysql-performance-wp_wc_users_voted/#post-17613


ReplyQuote
Share: