Skip to content

Querybuilder / Segment SQL Optimisation #925

Closed
@sadortun

Description

@sadortun

Hi Oro Team,

We are investigating why on some query the Segment page become very slow ( 30-45 seconds to load with complex query),

Topic 1

We found that the filter query is executed twice and the only difference is the LIMIT clause. and there is query executed multiple times

  • If you look bellow at query # 57 and query # 59. Is # 57 nessessary ? If not, this could improve loading time by 25% !
  • If you look at query # 56 and # 58, they are identical .... That would be another 25% improvement in speed.

Optimizing theses two would give users a 50% improvement in all features related to segments !

(example with query email contains "a"
image

Topic 2

In our use case, the COUNT() query takes almost 15 seconds, compared to the SELECT which takes about 300ms.

  • Do you have any idea why the COUNT() is taking such excruciating (50 times) time to run ?

image

Have a good day,
Samuel

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions