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{
update_post_meta
}
I think it will be worse, won't it?
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{
update_post_meta
}
I think it will be worse, won't it?
Share Improve this question asked Feb 8, 2019 at 16:29 federico sgoifofederico sgoifo 313 bronze badges1 Answer
Reset to default 0I 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.