-
Notifications
You must be signed in to change notification settings - Fork 349
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
Segment builder generate unused SQL Joins #967
Comments
Thank you for an investigation @sadortun! |
Thanks @anyt, Do you have any ETA ? I think this issue is fairly important to any of your users who use reports and segments. Without knowing, they all face a severe performance hit. We are also ready to contribute $$$ if it can help sped up the resolution of this issue. Contact me by email if you are interested. Have a great day, |
Hi all, For example, the given query built with old filters looks like this
|
FYI @x86demon |
@vtsykun Thanks for time to share theses details, this little option is very useful !! I wish i knew it existed before ! |
Hi @anyt ! Do you have an update for this ? We use segments extensively and this is still causing us an headache. If you are able to expedite the resolution of this issue we can contribute to the development cost. Send me an email if you are interested. Have a great day, |
For anyone interested who have performance issue with their segments, we have a workaround for this. It allow an optimization on segment loading time from 2x to 15x. Feel free to contact me for more info |
Hi @sadortun, After the investigation, the team says that the only way we see to optimize the performance is to rewrite the builder from scratch, and there is no guaranty that everything would be fast for both database providers, MySQL, and Postgres. Optimizing some specific queries, like tags, could work, but for now, we don't see how to optimize all the similar queries. |
Hi @anyt, Thanks for your quick answer. As you mentioned, i spent countless hours trying to find if the issue was fixable simply, but sadly i could not, The issue seems to be part of the design of the QueryDesigner. Our solution was to build a very simple but effective workaround. We look at all the This simple fix allows to speed up queries that where taking over 5 minutes, down to about 5 seconds. This allow us to use the QueryDesigner to allow our users to create complex queries that filter records from a table containing hundred of thousand of records, with related entities table containing about 10 millions records. We are actively testing (and logging) every query optimization over the next week and we will rollout the feature to production servers by the end of next week Here is the workaround: https://github.com/NewEraSystems/platform/pull/1/files Have a great day, |
Hi Oro Team,
It took me 4 months, but i finally was able to reproduce the issue we are facing. I was also able to reproduce this issue on demo.orocrm.com
This is a follow up on #925 Topic # 2. Ill move it here since i was able to reproduce the issue, but i am unable to find the source of the problem (yet :) ) !
Thé following example is with Tags, but the same behaviour is repeated with any Virtual Relationships in the QUery filter
How to reproduce
Results
The generated query will look something like this :
![image](https://user-images.githubusercontent.com/794449/67742147-94c6c580-f9f1-11e9-8792-037adffc82dc.png)
As you can notice, there is two blocks of the query that repeats,
RED Block 🔴
Green Block 💚
The text was updated successfully, but these errors were encountered: