Speed/Query Oddities - update_option?

  • Answered
Couldn't find my original question; apologies if this posts twice.

First, I am brand new to Wordpress. I work as a developer, but this is out of my realm of expertise. After reaching out to In Motion on three separate occasions and having received some support from the theme developers, I'm still completely stuck.

Over the last few weeks of getting accustomed to Wordpress and all the different capabilities, I've begrudgingly dealt with extremely slow response times from both the admin page when making changes as well as from the site itself outside of the admin. I did some reading, deleted unneeded plugins, downloaded W3 Total Cache for monitoring and was still coming up short. I then called In Motion where I was told to optimize images, use a CDN, minify files, etc. They also edited most, if not all, the parameters within my .ini file to be completely maxed out. On a follow up call, I was told to switch to 7.0.12 PHP version.

After that, I worked for a while getting all those things done and now consistently get A grades from both PageSpeed and YSlow. GTMetrix also says my page load times are between 1-3 seconds very consistently. Even the 'load video' feature on GTMetrix (records the site opening in slow motion) shows the site opening in <3 seconds. But still when you attempt to open the webpage or are doing any edits from the Admin, it takes at least 20-30 seconds to load. I do see from cPanel that the CPU is maxing out to 100% during the entire during those changes or loads, then of course, subsides when it finally finishes.

Another oddity is from the query monitor plugin. Most of the time, it seems accurate with the render times, but sometimes its not. at all. It may take 30 seconds for me to load something, but query monitor says 3 seconds.

With GTMetrix scores of A's, response times consistently in the sub 3.0s, the video on GTMetrix appearing to show an accurate and very fast load, and seemingly odd query times in the monitor, does anyone have a clue on what the culprit is?

The 'slow queries' are usually:

Query Caller Component Rows Time
FROM `wpcx8lnhca_options`
+ Core 4 12.4624


UPDATE `wpcx8lnhca_options`
SET `option_value` = '1485481236'
WHERE `option_name` = '_transient_timeout_plugin_slugs'
+ Core 1 2.1268

The queries listed above vary from time to time depending on what I'm doing, but this is really consistent. Let me know if you have any ideas or want to point out what we've all missed for so long.

Very much appreciated....
Tim S.
Hello, Thank you for your question about a slow loading WordPress website. This is quite an interesting situation, all things considered. You currently have a maintenance page loading and yet that takes quite a while to load. The interesting thing I started to look at was the amount of transients you have in the _options table. Currently, you have about 475 with a little over 100 of those set to autoload. This leads me to believe the _options table is the issue for slow loading. Basically, the way transients work, is you can load and store options from this table in memory. Storing options that are used frequently is a good concept seeing how it's much faster to load from memory than to query the database and return the value. However, many times, installing a bunch of plugins trying to find the right one to use within your site, creates a large amount of unnecessary transients. This is a bad thing, considering removing or disabling the plugin in the backend of WordPress does not remove the transient record. This leaves a bunch of unnecessary garbage in the _options table. I found a great resource for you to take a look at in reference to optimizing the _options table. Optimizing the WP Options Table for Speed This is my best guess as to what's going on within your website. I'd start by cleaning up the _options table and see if that makes a difference. I hope this helps! Thanks! Gratefully, Tim S