-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Performance comparison #5
Comments
To be honest, I haven't done any performance-related tests yet. There are no "tests" at all. ;) Would be nice to have them, though. But what does "much slower" mean in this case? |
Okay hehe.. in the specific case i'm retrieving objects from a table, where i need to join another one which holds location & zip codes.. The query without restricting results by the GEO-Query takes 1-2ms, the one with geo data 150-170. |
That's pretty much indeed. Does your joined table have an index for location and zip code? |
Yeah, added an combined index on both fields, increased performance.. but the 150-170ms got this index already. I'll try to do some query analysis ont he weekend, didn't find the time to investigate it further .. sorry :( |
@weyandch: Any news on this? |
/ping @weyandch |
heya, no news on that.. never continued work on that project i used your bundle on, might find some time on the holidays. |
Have you found any solution? Do you think there is any way to implement this solution? |
👍 Nice catch @lughino ! |
This bundle provides doctrine functions which can be used in a query, while the optimization mentioned in the presentation (which I've also taken the formula from when creating the bundle) works by adding conditions to the WHERE part of that query, so I have no way to add them automatically when invoking one of the functions. But you could (or even should) add them yourself. |
I've added the optimization to the test suite in 15fca00 to show how it could be done. |
Thanks a lot for pointing me to this optimization tweak! Using CraueGeoBundle/Tests/IntegrationTestCase.php Line 148 in 7187617
In my current use case (big dataset, using STI, lots of joins and complex where conditions) I'm down from ~2850ms to ~75ms! |
Heya craue,
i've just installed the bundle (Doctrine 2.1.7) and made a few tests. The Queries i'm executing contain 2 joins and are performing much slower than before.
Adding indices on my "poi" table improved performance a little bit (<10%) ... going to try adapting the model to use the long/lat. query, but any hint on the most performant version would be nice in the docs.
-chris
The text was updated successfully, but these errors were encountered: