admin管理员组文章数量:1023051
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.
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.
本文标签: wp queryupdatepostmeta performance in a loop woocommerce
版权声明:本文标题:wp query - update_post_meta performance in a loop woocommerce 内容由热心网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://it.en369.cn/questions/1745549134a2155537.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论