Skip to content

Replaced the setting of Ids to the whereInQuery with a more performant implementation#476

Closed
HarmenM wants to merge 3 commits intodoctrine:masterfrom
HarmenM:master
Closed

Replaced the setting of Ids to the whereInQuery with a more performant implementation#476
HarmenM wants to merge 3 commits intodoctrine:masterfrom
HarmenM:master

Conversation

@HarmenM
Copy link

@HarmenM HarmenM commented Oct 12, 2012

While working with large datasets in combination with pagination (ie. a pagination window of 100 or more), the performance drastically decreased.

I tracked the problem down to the setting of the parameters. In the old implementation, the parameters are set individually. This pull request sets the parameter as an array to the Query and Walker.

Testing results (# of entities, original performance, improved performance):
32 0,036 0,033
64 0,043 0,037
128 0,065 0,043
256 0,133 0,057
512 0,360 0,088
1024 1,212 0,157
2048 4,462 0,332
4096 17,203 0,818

HarmenM added 2 commits October 12, 2012 14:21
replaced the for-loop which adds the InputParameters for a single InputParameter for use with an array instead of a set of scalars.
Replaced the foreach loop adding all IDs as single parameters with a single parameter which injects the IDs as an array.
@doctrinebot
Copy link

Hello,

thank you for positing this Pull Request. I have automatically opened an issue on our Jira Bug Tracker for you with the details of this Pull-Request. See the Link:

http://doctrine-project.org/jira/browse/DDC-2071

@guilhermeblanco
Copy link
Member

Could you update the tests to match the newly generated SQL?

@guilhermeblanco
Copy link
Member

ping

@HarmenM
Copy link
Author

HarmenM commented Nov 6, 2012

And hereby the updated tests.
My apologies for the delay.

@beberlei
Copy link
Member

Merged into master and 2.3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants