Description
Robert Hunt opened DATAJPA-1007 and commented
It would be useful to add a note about JDBC driver behaviour in relation to streaming results. I know it goes beyond the scope/control of Spring Data but someone might assume that by using a Stream return type that the ResultSet is being fetched in a streaming nature from the database.
In the case of MySQL this is certainly not the case as a @QueryHint
needs to be included as a signal to the underlying driver (see: http://knes1.github.io/blog/2015/2015-10-19-streaming-mysql-results-using-java8-streams-and-spring-data.html)
Just a small note as a hint to the reader that they may need to investigate the behaviour of their specific drivers in regard to memory-efficient fetching would be useful
Reference URL: http://docs.spring.io/spring-data/jpa/docs/current/reference/html/#repositories.query-streaming