问题描述
在spring batch reference中,有一个模式叫做driving query pattern
https://docs.spring.io/spring-batch/4.1.x/reference/html/common-patterns.html#drivingQueryBasedItemReaders
In spring batch reference, there is a pattern called driving query pattern
https://docs.spring.io/spring-batch/4.1.x/reference/html/common-patterns.html#drivingQueryBasedItemReaders
不知道对这个模式有没有误解,驱动查询模式
会不会导致N+1问题?
I don't know if I misunderstand this pattern right, doesn't driving query pattern
cause N+1 problem?
对我来说,这看起来像是一个经典的 N+1 问题,尤其是它们在 ORM 世界中的做法很糟糕.
It looks like a classic N+1 problem to me, especially they are bad practice in ORM world.
推荐答案
是的.对于每个项目,处理器将发出另一个查询以获取有关当前项目的附加信息.
Yes it does. For each item, the processor will issue another query to grab additional information about the current item.
这篇关于驱动查询模式不会导致 N+1 问题吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!