Skip to content

SQL query issue with optimization #2586

@lvca

Description

@lvca

This following query doesn't work:
select from Chat let users = in('HasChat'), brain = out('CreatedFromAssistant') where #22:1 IN $brain AND ( contextVariables['local:fin'] = '7:106514432' OR @rid = '#7:106514432')

If I remove the OR condition inside the parhentesis works.

My first thought is to debug the execution and at a certain point the query is "flatten". Not sure why, maybe for index optimization? In the class SelectExecutionPlanner, method optimizeQuery() starts the computation of the flatten.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions