AI Assistant
MYSQL performance w...
 
Notifications
Clear all

MYSQL performance wp_wc_users_voted

14 Posts
4 Users
0 Reactions
3,284 Views
(@dnikola)
Active Member
Joined: 7 years ago
Posts: 11
Topic starter
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
  [#4466]

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!



   
Quote
Astghik
(@astgh)
Illustrious Member Admin
Joined: 8 years ago
Posts: 6645
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
 

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: 8 years ago
Posts: 6645
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
 

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: 7 years ago
Posts: 11
Topic starter
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
 

-Thanks for your replay!

 

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

 

 



   
ReplyQuote
Astghik
(@astgh)
Illustrious Member Admin
Joined: 8 years ago
Posts: 6645
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
 

@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: 7 years ago
Posts: 11
Topic starter
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
 

Great.

Thanks. 



   
ReplyQuote
(@dnikola)
Active Member
Joined: 7 years ago
Posts: 11
Topic starter
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
 

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: 8 years ago
Posts: 6645
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
 

@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: 7 years ago
Posts: 11
Topic starter
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
 

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: 7 years ago
Posts: 11
Topic starter
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
 

Hello

 

I have same problem again 

 

http://prntscr.com/pwfnyr

 

 



   
ReplyQuote
 Tom
(@tomson)
Famed Member Admin
Joined: 11 years ago
Posts: 4245
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
 

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: 7 years ago
Posts: 11
Topic starter
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
 

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: 7 years ago
Posts: 11
Topic starter
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
 

any news?



   
ReplyQuote
Elvina
(@elvina)
Support
Joined: 7 years ago
Posts: 1403
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
 

@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