DQL: large data set and deep nested object #5156

Closed
opened 2026-01-22 14:59:55 +01:00 by admin · 8 comments
Owner

Originally created by @ajax13 on GitHub (Jun 17, 2016).

Originally assigned to: @Ocramius on GitHub.

Hello every one,

I have a DQL query for deeply nested object with a large data set, the query takes a lot to be executed.
So I wonder of there is a way to define the value of max deep level (of nested attributes) to be searched/returned?

Thx!

Originally created by @ajax13 on GitHub (Jun 17, 2016). Originally assigned to: @Ocramius on GitHub. Hello every one, I have a DQL query for deeply nested object with a large data set, the query takes a lot to be executed. So I wonder of there is a way to define the value of max deep level (of nested attributes) to be searched/returned? Thx!
admin added the Invalid label 2026-01-22 14:59:55 +01:00
admin closed this issue 2026-01-22 14:59:55 +01:00
Author
Owner

@lcobucci commented on GitHub (Jun 17, 2016):

Do you really need to load all those objects? Can't you just use sql?

@lcobucci commented on GitHub (Jun 17, 2016): Do you really need to load all those objects? Can't you just use sql?
Author
Owner

@ajax13 commented on GitHub (Jun 17, 2016):

I want to deal with Objects :/

@ajax13 commented on GitHub (Jun 17, 2016): I want to deal with Objects :/
Author
Owner

@lcobucci commented on GitHub (Jun 17, 2016):

But you can deal with objects by using the native query api and just loading the objects you need...

What are you building that you need to load that large dataset?

@lcobucci commented on GitHub (Jun 17, 2016): But you can deal with objects by using the native query api and just loading the objects you need... What are you building that you need to load that large dataset?
Author
Owner

@ajax13 commented on GitHub (Jun 17, 2016):

If I do like you said, it will cost me the I/O Database Server time(for every object I need), besides every object I load contains many nested other attributes(objects).

And yes I have a large dataset, but I Think the problem is with the nested Objects :/

@ajax13 commented on GitHub (Jun 17, 2016): If I do like you said, it will cost me the I/O Database Server time(for every object I need), besides every object I load contains many nested other attributes(objects). And yes I have a large dataset, but I Think the problem is with the nested Objects :/
Author
Owner

@lcobucci commented on GitHub (Jun 17, 2016):

Sorry I don't follow... You mapped a lot of nested objects in doctrine, asks for them be loaded eagerly and you want doctrine to limit the loading of the objects.

It sounds like a modelling issue or maybe that you want to use objects to do a database work.

@lcobucci commented on GitHub (Jun 17, 2016): Sorry I don't follow... You mapped a lot of nested objects in doctrine, asks for them be loaded eagerly and you want doctrine to limit the loading of the objects. It sounds like a modelling issue or maybe that you want to use objects to do a database work.
Author
Owner

@lcobucci commented on GitHub (Jun 17, 2016):

Could you provide a gist with your mapping and the dql you're using so we could help you better?

@lcobucci commented on GitHub (Jun 17, 2016): Could you provide a gist with your mapping and the dql you're using so we could help you better?
Author
Owner

@ajax13 commented on GitHub (Jun 17, 2016):

Thank you very much , actually I find the too nested entity that causes this issue. I am going to eliminate it from my entity I am not racking my brains anymore!
Unfortunately, there is not a function to specify a maximum level for DQL :S

@ajax13 commented on GitHub (Jun 17, 2016): Thank you very much , actually I find the too nested entity that causes this issue. I am going to eliminate it from my entity I am not racking my brains anymore! Unfortunately, there is not a function to specify a maximum level for DQL :S
Author
Owner

@Ocramius commented on GitHub (Jun 18, 2016):

Closing here: this is a question for the mailing list or stackoverflow, not an issue to be reported, sorry.

@Ocramius commented on GitHub (Jun 18, 2016): Closing here: this is a question for the mailing list or stackoverflow, not an issue to be reported, sorry.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: doctrine/archived-orm#5156