java - 当数据库结构与我们在使用 hibernate 的对象关系映射中指定的不匹配时对系统性能的影响
问题描述
最近我开始非常关心使用 Hibernate 的系统性能。您可以在下面提到的关系中看到一个主应用程序只能有一个子应用程序。但是数据库包含同一个主应用程序的多个子应用程序。系统随机选择一个子应用程序,这不会导致用户可以注意到的任何问题,但我假设这会以某种方式影响我系统中堆内存方面的性能. 在这种情况下,对性能的影响是否显着?
class MainApplication{
@Column(name="main_app_id")
int mainAppId;
String firstName;
String lastName;
List<Address> address ;
}
class SupportingApplication{
int supportingAppId;
//defining the relation
@Column(name="main_app_id")
int mainAppId
@OneToOne
@JoinColumn(name="main_app_id", referencedColumnName="main_app_id", insertable=false, updatable=false)
private MainApplication mainApplication;
String city;
String state;
}
解决方案
推荐阅读
- javascript - 如何使用 Node.JS 编辑当前以上的控制台行?
- java - GSON 序列化因自定义对象而失败
- .net - Ef Core 3.1 值转换器
- node.js - 在构建 React.js 上设置环境变量
- dialogflow-es - 无法让丰富的按钮在对话流上工作。它返回空响应
- reactjs - 如何在useEffect-React加载的组件中渲染内容
- docker - 将内容从不同的 docker 镜像复制到在 k8s 作业中运行的容器
- kotlin - 如何在 Kotlin 中以位、最小值和最大值输出 Int 大小?
- c# - 如何在c#中使用``
- php - 无法退还 EasyPost 测试货件