[v10.1.x] Search v1: Remove unnecessary subqueries (#72710)
Search v1: Remove unnecessary subqueries (#72388)
* Add feature flag
* Introduce interface and dummy implementation
* Add tests for the new filter
* accessControlDashboardPermissionFilterNoFolderSubquery implementation
* join only if it's necessary
* force ordering for tests
* Temporarily enable new query for benchmarks
(cherry picked from commit 2c26a02b82)
Co-authored-by: Sofia Papagiannaki <1632407+papagian@users.noreply.github.com>
This commit is contained in:
co-authored by
Sofia Papagiannaki
parent
d7a65cb7ca
commit
5769d0be49
@@ -99,7 +99,10 @@ func (b *Builder) applyFilters() (ordering string) {
|
||||
|
||||
for _, f := range b.Filters {
|
||||
if f, ok := f.(FilterLeftJoin); ok {
|
||||
joins = append(joins, fmt.Sprintf(" LEFT OUTER JOIN %s ", f.LeftJoin()))
|
||||
s := f.LeftJoin()
|
||||
if s != "" {
|
||||
joins = append(joins, fmt.Sprintf(" LEFT OUTER JOIN %s ", s))
|
||||
}
|
||||
}
|
||||
|
||||
if f, ok := f.(FilterWhere); ok {
|
||||
|
||||
Reference in New Issue
Block a user