I have a simple question, I am working on the list order screen of woocommerce and want to add some buttons that via ajax will update some data to the database using update_post_meta. The issue is that these buttons are pressed with a frequency more or less 10 times/minute.

Can this generate any problem with the database?

If the answer is yes, what would be the best practice for this?

I thought that maybe I can update this data at the same time, however, if I put this in a loop:

loop of 40 items{

I think it will be worse, won't it?


I think, an idea would be to save your values on a new small table with all you need, and have a script that once every "n" hours update all metas.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.