Support Forum

Advanced Search
Forum Scope


Match



Forum Options



Minimum search word length is 3 characters - maximum search word length is 84 characters
general-topic
Performance Issues, Database Engines and Slow Queries, Oh My!
Avatar
jim
Here and Now
Member
Pro Subscribers
Offline
Jun 20, 2013 - 9:42 pm

...how often are you seeing it per page load?

Not sure, how might I determine that?

On a related note, my server guy asked if the SF plugin loads on every page of the site. I presumed it only loads on /forums – our Forums page permalink. Is that right?

TripawdsSimple:Press powers the Tripawds Discussion Forums.

It's better to hop on three legs than to limp on four.

The Tripawds Blogs Community is made possible by The Tripawds Foundation.

Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
Offline
Jun 20, 2013 - 10:43 pm

boy...  we used to have a built in way to output this debug info, but cannot seem to remember...

will dig around, but may need Andy to weigh in on how to activate it...

Avatar
Yellow Swordfish
Glinton, England
SP Master
Offline
Jun 21, 2013 - 3:56 am

On a related note, my server guy asked if the SF plugin loads on every page of the site. I presumed it only loads on /forums – our Forums page permalink. Is that right?

The answer to that is both yes and no! All plugins have to load a certain amount of code - in our case SP needs a certain base of code loaded simply to enable us to discover whether a forum page has been called or not. If it is NOT a forum page being requested then we load no more. So for non-forum pages the loading is as light as we can make it.

The exception to this, of course, is if items like template tags, short-codes or the recent posts widget are being used to display forum data outside of the forum page. If this is the case then, of course, more code needs to be loaded on every page load to accommodate that.

By the way - I can give you a code edit to stop the show tables query although if we are able to do that as standard still needs some investigation. Although I still do not understand why it should be slow. This seems to be unique to your environment...

andy-signature.png
YELLOW
SWORDFISH
Avatar
jim
Here and Now
Member
Pro Subscribers
Offline
Jun 21, 2013 - 8:40 am

If it is NOT a forum page being requested then we load no more.

Great, thank you for the clarification.

I can give you a code edit to stop the show tables query...

Please do, I'm happy to help test this for you!

We are taking various steps to fine tune MySQL, and have yet to identify exactly what in our server environment may be causing the slow queries, so I'm willing to try anything in the meantime to help mitigate the issue.

I found six files with the SHOW TABLES LIKE query, but the only one referencing the sfoptions query that keeps hanging up is:

sp-api-primitives.php:189:  $optionstable = spdb_select('var', "SHOW TABLES LIKE '".SF_PREFIX."sfoptions'");

This just seems like too much of a coincidence with the recurrence of errors on the same file that we're seeing in the SF Toolkit Error Log i mentioned earlier in this thread. Could it have to do something with how I deleted a number of sfmembers and related data from sfmemberships, while keeping them in wp_users and not removing any other sfmember-related metadata? Hope that makes sense.

Thanks again for your time, sorry to be such a pain.

TripawdsSimple:Press powers the Tripawds Discussion Forums.

It's better to hop on three legs than to limp on four.

The Tripawds Blogs Community is made possible by The Tripawds Foundation.

Avatar
Yellow Swordfish
Glinton, England
SP Master
Offline
Jun 21, 2013 - 9:32 am

There is no connection between the show tables query and the notices and warnings you were getting. But whether they have anything to do with your data removal I am unsure of yet as I have not investigated that deeply. Probably later today all being well.

As soon as I have code for the options table 'show' query I will let you have it.

andy-signature.png
YELLOW
SWORDFISH
Avatar
jim
Here and Now
Member
Pro Subscribers
Offline
Jun 21, 2013 - 9:45 am

Yellow Swordfish said:

no connection between the show tables query and the notices and warnings...

As soon as I have code for the options table 'show' query I will let you have it.

Thank you! I guess the query being in the same file is indeed just a coincidence then.

As to innoDB tables then the only negative I am aware of is that at one point they did not support FULL TEXT indexing which SP makes use of on the sfposts table.

According to my server guy, apparently innodb still does not support full-text search.

InnoDB uses row-level rather than table-level locking. If a row is being inserted, updated or deleted, only changes to the same row are held up until that request has completed. Tables that receive more updates than selects may be faster with InnoDB.

With this being the case, might a user benefit by converting all SF tables except sfposts to InnoDB? Is that the only table using FULLTEXT? Steve?

TripawdsSimple:Press powers the Tripawds Discussion Forums.

It's better to hop on three legs than to limp on four.

The Tripawds Blogs Community is made possible by The Tripawds Foundation.

Avatar
Yellow Swordfish
Glinton, England
SP Master
Offline
Jun 21, 2013 - 9:52 am

sfposts is the only table using a full text index.

a very quick search seems to suggest that it is mySQL 5.6 that support full text indexing using innoDB tables.

Personally I like innoDB and hope we can all move to them one day as a matter of course.

andy-signature.png
YELLOW
SWORDFISH
Avatar
Yellow Swordfish
Glinton, England
SP Master
Offline
Jun 21, 2013 - 10:43 am

With reference to the 3 notices shown in post #3 of this thread - could you check something for me. In particular the email settings (foirum admin > Options > Email Settings) nad those settings over on the right hand side of the panel.

Do you have values in for those and is the 'use' item checked on or off please? And if unchecked - could you check it, save and then uncheck it again  and save. See if the notices disappear?

andy-signature.png
YELLOW
SWORDFISH
Avatar
Yellow Swordfish
Glinton, England
SP Master
Offline
Jun 21, 2013 - 12:13 pm

OK Jim.

You need the sp-api-primitives.php file as you already know.

Locate the function sp_load_alloptions() which is the one with the SHOW TABLES query.

Comment out or remove these two lines of code in that function:

//    $optionstable = spdb_select('var', "SHOW TABLES LIKE '".SF_PREFIX."sfoptions'");
//    if($optionstable == false) return '';

and that should be just fine

andy-signature.png
YELLOW
SWORDFISH
Avatar
jim
Here and Now
Member
Pro Subscribers
Offline
Jun 21, 2013 - 2:41 pm

See if the notices disappear?

Thank you for the pointer... there were indeed no settings for those three SF email options, and the Use box was indeed unchecked. I entered values, checked the box and saved settings, then posted in the forums and loaded a few pages without the error showing up (if logged in realtime). I then turned the Use option back off as suggested.

The senders name: Tripawds
The email from name: Jerry
The email domain name: tripawds.com

It was just unclear if from name should be in the form of an address. Is this correct?

FYI: I took the same steps for the New User Email options which were also blank.

Since I am currently troubleshooting with my server guy too, I'm making changes one at a time and checking logs before proceeding. I may comment out the SHOW query later.

Thanks again for the guidance!

TripawdsSimple:Press powers the Tripawds Discussion Forums.

It's better to hop on three legs than to limp on four.

The Tripawds Blogs Community is made possible by The Tripawds Foundation.

Forum Timezone: Europe/Stockholm
Most Users Ever Online: 1170
Currently Online:
Guest(s) 1
Currently Browsing this Page:
1 Guest(s)
Top Posters:
Mr Papa: 19448
Ike: 2086
Brandon: 864
kvr28: 804
jim: 650
FidoSysop: 577
Conrad_Farlow: 531
fiddlerman: 358
Stefano Prete: 325
Member Stats:
Guest Posters: 619
Members: 17361
Moderators: 0
Admins: 4
Forum Stats:
Groups: 7
Forums: 17
Topics: 10127
Posts: 79625