【发布时间】:2020-06-03 08:18:51
【问题描述】:
我在 JPA save() 方法中有一个性能问题。我有“CustomerHistory”表,它就像一个日志表,我什至没有在我的应用程序中使用这个表数据。 (我没有在表中执行任何获取查询操作)。但是,如果我使用 JPA Save Method 保存“CustomerHistory”模型,则意味着每次保存数据后都会返回 CustomerHistory 模型。所以我需要知道它是否在性能中发挥重要作用?
public CustomerHistory saveCustomerHistoryLog(CustomerHistory customerHistory ){
return customerHistoryRepository.save(customerHistory );
}
【问题讨论】:
标签: mysql spring-boot spring-data-jpa