Support Forum

Advanced Search
Forum Scope


Match



Forum Options



Minimum search word length is 3 characters - maximum search word length is 84 characters
coding-topic
Heavy query being run daily
Avatar
Vertical Scope
Member
Free Members
sp_UserOfflineSmall Offline
Feb 6, 2014 - 12:10 pm

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

 

Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Feb 6, 2014 - 12:36 pm

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?

andy-signature.png
YELLOW
SWORDFISH
Avatar
Vertical Scope
Member
Free Members
sp_UserOfflineSmall Offline
Feb 6, 2014 - 1:18 pm

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?

Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Feb 6, 2014 - 3:02 pm

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.

andy-signature.png
YELLOW
SWORDFISH
Avatar
Vertical Scope
Member
Free Members
sp_UserOfflineSmall Offline
Feb 7, 2014 - 4:28 pm

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

Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Feb 8, 2014 - 3:52 am

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.

andy-signature.png
YELLOW
SWORDFISH
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: 617
Members: 17359
Moderators: 0
Admins: 4
Forum Stats:
Groups: 7
Forums: 17
Topics: 10125
Posts: 79620