Support Forum

After upgrade dbqueries increased!

WI WilRC
WilRC
Member

Hi, I’ve updated SP yesterday and I saw with Q-Monitor that total db-queries loaded on my frontpage has increased to 90 queries total. I have only loaded the the Sp recent post widget active op the frontpage. Simplepress pages is loading 66 queries, that’s great. What is going wrong?

I think an update of our theme has caused this problem! So it is not related to SP.

33 Answers

New Answer

YS Yellow Swordfish
Yellow Swordfish
Member

Before talking about the number of queries what version were you updating from?

WI WilRC
WilRC
Member

I just turned off all plugins and make them active one by one again.

By activate SP my dbqueries increased from 134 -> 241 on my frontpage!

I updated SP from 5.5.09 to 5.5.10! Before the update SP was only loading 5 queries on my frontpage. Where does this goes wrong? I can give you access to our devellopment area?

YS Yellow Swordfish
Yellow Swordfish
Member

if you look at the change log between 5.5.9 and 5.5.10 you will find that the only two significant changes were to the password form on users profiles and the construction of the option new registration email. These were because of poorly documented changes in WP that we missed and felt were important enough to warrant a speedy update. Nothing to do with database activity or queries. No changes that would make any difference whatsoever to home page loading.

if you want to dump the SP queries on your home page to a text file of some sort and PM them to me then I would be happy to take a quick look.

YS Yellow Swordfish
Yellow Swordfish
Member

If you concentrate on a single WP Post ID and look at the source being generated you will see that the Post ID appears in 15 separate queries – although mostly they are duplicates repeated over and over.

The curious thing is that if you do not run the page with the query monitor then you still get 15 and the query monitor display is still being generated even though not shown.

So are you sure this is a not a problem with the query monitor plugin?

WI WilRC
WilRC
Member

I don’t think that Query Monitor is duplicating queries. I did disabled all plugins and turned them on one by one. By turning on SP the frontpage increased with 95 queries. Very strange, maybe something went wrong during the upgrade proces?  

YS Yellow Swordfish
Yellow Swordfish
Member

I will take another look this morning. But…

Did you actually turn off the query monitor when you were testing this?

And has anything else been updated? In particular – any changes to the WP theme?

And no – I don’t see any way an update can change anything it wasn’t specifically created to change. There were no changes to the blog linking plugin in the last few updates which is why I am slightly suspicious.

YS Yellow Swordfish
Yellow Swordfish
Member

And…. can you try an experiment? Can you turn off the short forum topic listing in the sidebar widget and see if that is responsible?

WI WilRC
WilRC
Member

I have turned off the plugin template and tags. Queryload went down from 245 to 231

YS Yellow Swordfish
Yellow Swordfish
Member

They appear to still be on and showing up. So can’t look at the difference

WI WilRC
WilRC
Member

Turned off again. Please feel free to acces the adminpanel. I have provided you the login details.

YS Yellow Swordfish
Yellow Swordfish
Member

OK – so are you Ok with me turning on/off components as long as I leave it as it should be?

And you didn’t answer my other question regarding the WP theme. And a couple more:

Do you use Blog Linking on ALL posts? Do you use it on Comments?

Prior to recent updates – did your front page always show so many post exceprts?

WI WilRC
WilRC
Member

The WP theme is upgraded recently. 
We don’t use Blog linking on all posts only if manual edit a blog link. Not on default.
On comments we don’t use blog linking either.

Our frontpage always did have so many post exceprts. 
Headlines 2x
latest news 12x
T-news 2x
K-news 2x
A-news 2x

WI WilRC
WilRC
Member

It seems to be caused by the blog linking plugin. Deactivate this pluing will drop the queryload to 138!

YS Yellow Swordfish
Yellow Swordfish
Member

And the question about me changing component settings?

Oh yes – blog linking. That is why I have been asking about it above and why I wanted to know if the WordPress theme had been changed recently – especially the front page. It will probably come down to what filters and actions are being called by the WP theme to populate all of those excerpts. Some will trigger the query to determine if there is a blog link in place and some will not. Perhaps this has changed. Or perhaps at this moment you have a higher number of blog linked items on the front page. It would be useful and helpful to get to the bottom of it if we can.

The good news is that multiple calls to load the same data row will have a minuscule effect on overall performance as mySQL does a good job of caching data. But it is not ideal.