Database 如何加入编辑器发布DynamoDB(性能)
关于以下模式(来自amplify console/AppSync的模式): 假设我们有: 1个职位和5000个用户 如果表PostEditor中有1项具有以下内容,则性能会更好: 1个包含5000个对象的数组,属性为users id和post id 或者,如果我有5000件物品,性能会更好: 邮政id 用户id 我想要实现的是能够查询PostEditor表以获得: 每一个用户的帖子Database 如何加入编辑器发布DynamoDB(性能),database,performance,amazon-web-services,amazon-dynamodb,aws-appsync,Database,Performance,Amazon Web Services,Amazon Dynamodb,Aws Appsync,关于以下模式(来自amplify console/AppSync的模式): 假设我们有: 1个职位和5000个用户 如果表PostEditor中有1项具有以下内容,则性能会更好: 1个包含5000个对象的数组,属性为users id和post id 或者,如果我有5000件物品,性能会更好: 邮政id 用户id 我想要实现的是能够查询PostEditor表以获得: 每一个用户的帖子 一个包含5000个对象的post阵列的每个用户听起来都有问题。你在使用什么数据库 如果你正在使用,你应该记住。还有
一个包含5000个对象的post阵列的每个用户听起来都有问题。你在使用什么数据库 如果你正在使用,你应该记住。还有一些 但一天结束时,您可能需要做一些基准测试,以找到为您的服务提供最佳方式
type Post @model {
id: ID!
title: String!
editors: [PostEditor] @connection(name: "PostEditors")
}
# Create a join model and disable queries as you don't need them
# and can query through Post.editors and User.posts
type PostEditor @model(queries: null) {
id: ID!
post: Post! @connection(name: "PostEditors")
editor: User! @connection(name: "UserEditors")
}
type User @model {
id: ID!
username: String!
posts: [PostEditor] @connection(name: "UserEditors")
}