Search
Close
AI Search
Classic Search
 Search Phrase:
 Search Type:
Advanced search options
 Search in Forums:
 Search in date period:

 Sort Search Results by:

AI Assistant
Notifications
Clear all

Slow queries

10 Posts
2 Users
1 Reactions
1,646 Views
Posts: 305
Customer
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
(@percysgrowroom)
Member
Joined: 7 years ago
[#7150]

I keep getting a slow query warning for this:

 

wpForoAttachments->get_sizes()

 

Any ideas on how to resolve it? 


9 Replies
Posts: 305
Customer
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
(@percysgrowroom)
Member
Joined: 7 years ago

Can anyone help with this? 

 


Reply
6 Replies
 Tom
Admin
(@tomson)
Joined: 11 years ago

Famed Member
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

@percysgrowroom,

Use your phpMyAdmin database manager and execute the SQL below. Make sure the wp_ table prefix is changed to your table prefix:

ALTER TABLE `wp_wpforo_attachments` ADD INDEX(`size`);

Reply
Customer
(@percysgrowroom)
Joined: 7 years ago

Member
Posts: 305
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

@tomson Ok thanks Tom, Ill try, but im not too sure what you mean lol 

I will look into it, I appreciate your help man thanks 


Reply
Customer
(@percysgrowroom)
Joined: 7 years ago

Member
Posts: 305
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

@tomson Hi tom, I still havent done this as im scared i might break something, could you explain what Io have to do in a little more detail when you have time so i feel more comfortable doing it 🙂 I hate messing with databases


Reply
 Tom
Admin
(@tomson)
Joined: 11 years ago

Famed Member
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

@percysgrowroom,

The SQL command will add an index to wp_wpforo_attachments table > size field and make it faster. Just open your database with phpMyAdmin database manager, make sure your database table prefix is wp_ (if not, just change it) and execute the SQL query in the [SQL] tab.


Reply
Customer
(@percysgrowroom)
Joined: 7 years ago

Member
Posts: 305
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

@tomson what are the chances of it breaking my site? lol


Reply
 Tom
Admin
(@tomson)
Joined: 11 years ago

Famed Member
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

0%,

In any case you can back up the wp_wpforo_attachments table 


Reply
Posts: 305
Customer
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
(@percysgrowroom)
Member
Joined: 7 years ago
Posted by: @tomson

Just open your database with phpMyAdmin

I did that and then nothing  makes sense lol 

Posted by: @tomson

make sure your database table prefix is wp_ (if not, just change it) and execute the SQL query in the [SQL] tab.

can you explain this in more detail for a noob please mate lol 


Reply
1 Reply
 Tom
Admin
(@tomson)
Joined: 11 years ago

Famed Member
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

@percysgrowroom,

It adds a table index for 'size' field. It makes the counting of total attachments size many times faster. This will help make the wpForoAttachments->get_sizes() function (reported in your first post) to work faster.


Reply
Share:
Scroll to top