doesn't driving query pattern cause N+1 problem?

狂风中的少年 提交于 2021-01-29 06:35:10

问题


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

I don't know if I misunderstand this pattern right, doesn't driving query pattern cause N+1 problem?

It looks like a classic N+1 problem to me, especially they are bad practice in ORM world.


回答1:


Yes it does. For each item, the processor will issue another query to grab additional information about the current item.



来源:https://stackoverflow.com/questions/57156705/doesnt-driving-query-pattern-cause-n1-problem

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!