最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

customization - Advice on how to structure a custom plugin

programmeradmin1浏览0评论

I am attempting to create a custom plugin and would like some advice/ideas on how best to store the data.

Expected Posts ~ 1,000 Expected Users ~ 10,000

Each user will need to have at least one value stored PER post.

Is the best way to do this by adding new columns to the user_meta table?

Just looking for some guidance on the most efficient method so I don't bloat my db unneccesarily.

Thanks.

I am attempting to create a custom plugin and would like some advice/ideas on how best to store the data.

Expected Posts ~ 1,000 Expected Users ~ 10,000

Each user will need to have at least one value stored PER post.

Is the best way to do this by adding new columns to the user_meta table?

Just looking for some guidance on the most efficient method so I don't bloat my db unneccesarily.

Thanks.

Share Improve this question edited Jun 1, 2019 at 21:21 Shaun21uk asked May 27, 2019 at 20:01 Shaun21ukShaun21uk 311 silver badge8 bronze badges 2
  • It’s a little bit hard to guess what numbers (and how many of them) are you storing based on the description above - could you explain it a little bit more? – Krzysiek Dróżdż Commented May 28, 2019 at 4:50
  • So are you just saying that each business will have a "total" number and a "current" number, and when anyone uses the button on their page, both of those should increase by 1 and be displayed? It sounds like you can just create a "business" CPT and use postmeta - but it depends on whether you'll ever want to query by those numbers. If so you should make a custom taxonomy for the numbers so that those queries will run faster. – WebElaine Commented May 28, 2019 at 15:20
Add a comment  | 

1 Answer 1

Reset to default 0

The number in the above example are not indicative of a need for a custom database table solution, the database will be fine with just using the users table for the users, posts table for the posts and usermeta table for the link between users and posts.

Its hard to offer a more definitive answer without knowing a little more about what the needs of the business / plugin are to be.

发布评论

评论列表(0)

  1. 暂无评论