Practices to extract data using DTO projections

Hi everyone, I’m quite new to Hibernate ORM and I have a question about efficient practices to extract data using Hibernate.
To be more precise, I have lot of data to extract from an oracle database. This data is also quite interconnected with other tables, meaning that I have a root entity and several relations and at the same time the entities of these relations have other relations and so on. I actually don’t have lots of Lists in my root entity, nor in others.I then have to process this data and format it to a file (most of the cases in csv).

I tried to extract DTO projections using multiple threads and paginating based on a page size and the number of records. And I extracted all the needed data for each extraction batch in order to create the csv record. First, question is that a good practice? Second question, are there better solutions? Is is better to delay the fecth of related data so that the transactions are as short as possible?

I’m asking this because I did not really see much on the web about this. And I’m actually getting a little bit confused.

Thank you