Wordpress Themes - WP Forum at BFA

Wordpress Themes - WP Forum at BFA (http://forum.bytesforall.com/index.php)
-   New Versions, & Updating (http://forum.bytesforall.com/forumdisplay.php?f=12)
-   -   Database performance issue with 3.7.23 (http://forum.bytesforall.com/showthread.php?t=23116)

foschizzle Mar 21, 2015 07:23 AM

Database performance issue with 3.7.23
 
I've noticed that Atahualpa performs a ~20k SQL update of wp_options where name='bfa_ata4' on a large percentage of uncached page views. This causes a large amount of unnecessary Mysql write activity and can be a large drain on performance - impacting not just the page view but the entire server.

It appears to just be making the same change back and forth:

h_blogtitle;i:1 to h_blogtitle;i,2 and h_posttitle;i:1 to h_posttitle;i:2

the next update then reverses it.

It would seem that it may be the code in bfa_get_options.php around line 506:

if ( $bfa_ata['h1_on_single_pages'] == "Yes" AND ( is_single() OR is_page() ) ) {
$bfa_ata['h_blogtitle'] = 2; $bfa_ata['h_posttitle'] = 1;
} else {
$bfa_ata['h_blogtitle'] = 1; $bfa_ata['h_posttitle'] = 2;
}


Thanks for looking at this.

juggledad Mar 21, 2015 11:27 AM

How did you determine it was doing an MySQL update?

As far as I know, the only time an update to wp-options table is done is in the backend when you hit the save button.

Now, you will see a get each time a page is requested to get the one row in the database (the 'bfa_ata4' row) which contains all the options. The code you are pointing to has not changed since at least 3.7.15 and probably earlier. That code is just flipping the values of two variables in an array. No MySql call at all.


All times are GMT -6. The time now is 05:36 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.