php - Will this eat up alot of DB resources? How can i measure of prevent issues? -


I am re-developing my online business There are several things that I would like to check or update on page load. For example

  $ db-> Update ('Update Staff Set Status = 2 Where Expiration Exists;' .time ()); $ Db- & gt; Update ('UPDATE loginTokens set status = 2 timed out & lt;' .time ()); $ Db- & gt; Update ('Update matches set status = 2 where expire;' .time ()); e.t.c. (About 10 other updates so far)  

There is no problem with the code, I am trying to make sure that it does not affect the load bar or load times less Less is done.

I am using PDOs and all these more checks / DB updates in my site's global file. I would like to know if there is a specific way that it should be done. I have read that when users submit the form, such updates should be made, for example, the user's membership ends when the user logs in. But I have many pages that display all the premium members for various reasons and I am up to date until possible without the possible issue of the whole site tedious DB resource etc. I am thinking that there is no better way to do things, or if there is a way to start these updates after the page is loaded then the user will not wait until these transactions happen. I am concerned about interfering with each other because many users are at the site at the same time.

The most obvious solution is to just update the current user in dealing with your web request and maintain it

This is especially important if you use the SAAS platform with a limited number of web process


Comments

Popular posts from this blog

java - Can't add JTree to JPanel of a JInternalFrame -

javascript - data.match(var) not working it seems -

javascript - How can I pause a jQuery .each() loop, while waiting for user input? -