MYSQL performance w...
 
Notifications
Clear all

MYSQL performance wp_wc_users_voted

14 Posts
4 Users
0 Reactions
2,257 Views
(@dnikola)
Active Member
Joined: 5 years ago
Posts: 11
Topic starter  

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 5 years ago by dnikola

   
Quote
Astghik
(@astgh)
Illustrious Member Admin
Joined: 7 years ago
Posts: 6154
 

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
(@astgh)
Illustrious Member Admin
Joined: 7 years ago
Posts: 6154
 

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)
Active Member
Joined: 5 years ago
Posts: 11
Topic starter  

-Thanks for your replay!

 

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

 

 


   
ReplyQuote
Astghik
(@astgh)
Illustrious Member Admin
Joined: 7 years ago
Posts: 6154
 

@dnikola

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


   
ReplyQuote
(@dnikola)
Active Member
Joined: 5 years ago
Posts: 11
Topic starter  

Great.

Thanks. 


   
ReplyQuote
(@dnikola)
Active Member
Joined: 5 years ago
Posts: 11
Topic starter  

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
(@astgh)
Illustrious Member Admin
Joined: 7 years ago
Posts: 6154
 

@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)
Active Member
Joined: 5 years ago
Posts: 11
Topic starter  

Hi @astghik

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)

 

Thanks!


   
ReplyQuote
(@dnikola)
Active Member
Joined: 5 years ago
Posts: 11
Topic starter  

Hello

 

I have same problem again 

 

http://prntscr.com/pwfnyr

 

 


   
ReplyQuote
 Tom
(@tomson)
Famed Member Admin
Joined: 10 years ago
Posts: 4213
 

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)
Active Member
Joined: 5 years ago
Posts: 11
Topic starter  

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)
Active Member
Joined: 5 years ago
Posts: 11
Topic starter  

any news?


   
ReplyQuote
Elvina
(@elvina)
Support
Joined: 5 years ago
Posts: 1403
 

@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:
Scroll to top