Ancestor relation in datastore

前端 未结 2 457
清酒与你
清酒与你 2020-12-06 22:11

I have three entities: user, post and comment. A user may have multiple posts and a post may ha

2条回答
  •  臣服心动
    2020-12-06 22:22

    I think the question to ask is: Are you expecting:

    • User to create Posts more than once per seconds (I doubt :)
    • People to comment on a Post more than once per second (could happen)

    It not, then having ancestors queries will be faster than normal queries. So it depends of your usecase. I'd go for query speed unless you know you will have thousands of comments on posts.

提交回复
热议问题