Support Forum

Heavy query being run daily

VS Vertical Scope
Vertical Scope
Member

Hi there

There is massive query happening daily which is occupying resources, every morning, and am trying to figure out which possible cron is calling it. Looking at the spdbComplex class, couldnt really figure out which select has caused it… so asking for your help please… the partial query I got in log is about:

SELECT SQL_CALC_FOUND_ROWS DISTINCT IF(wp_sfmembers.admin=1, 0, IFNULL(wp_sfmemberships.usergroup_id, 99999999)) AS usergroup_id, IF(wp_s…

more code digging did lead to Members List Class, sp_memberList_query(! if im right), so … is there any job calling this part daily? which I can switch to a bigger interval maybe, before trying to rewrite the query, please :S

Thanks,

Sep

 

5 Answers

New Answer

YS Yellow Swordfish
Yellow Swordfish
Member

That is a complex query I know.

The class that query comes from is only run when someone clicks on the members list button. the class is not instantiated from any other component in the system so that suggests – if you see this daily – that it is a user clicking ion the members button? Is that possible?

VS Vertical Scope
Vertical Scope
Member

so it is part of functions triggered thru admin panel only? or is it including member list btn from forum itself? Not a lovely msg to see on your site confused

Error establishing a database connection
Thanks

Sep

Ps: do you possibly have any doc on that particular function to give me a better view on what is exactly doing?

YS Yellow Swordfish
Yellow Swordfish
Member

No nothing to do with the admin access. I am referring to the members button/link at the top of the forum display. Whether you allow your users to have access to this function is a permission you can turn on or off.

Afraid I have no documentation currently that describes that class file but… if you are seeing that particular message on the front end I would talk to your host as it suggests a badly configured MySQL server.

VS Vertical Scope
Vertical Scope
Member

k actually issue got solved really easier (thanks to one of our sys admins, coz I really didnt pay attention when installed the plugin)

The additional tbls of plugin, were MYISAM (subject to much table locking contention), so converted them to InnoDB 

So far all is good

Thanks,

Sep

YS Yellow Swordfish
Yellow Swordfish
Member

That’s good news.

It can be a problem this. WordPress, by default, opts to build myISAM tables and in the case of Simple:Press, we follow suit and also use a full text index which have not been supported on innoDB tables until very recently in a version that many, if not most, hosts still do not supply.

I will open a ticket actually as it is probably time to re-investigate this one.