Project

General

Profile

Actions

Patch #43214

open

Optimize Project.allowed_to_condition by replacing `projects.status <> ...` with `projects.status IN (...)`

Added by Go MAEDA about 5 hours ago. Updated about 3 hours ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
Performance
Target version:
-
Start date:
Due date:
% Done:

0%

Estimated time:

Description

The attached patch replaces the condition projects.status <> ... with the equivalent projects.status IN (...) in the Project.allowed_to_condition method.

This change makes the SQL clearer and may improve performance, since IN (...) is generally more optimizer-friendly than a combination of <> conditions. A performance benefit of this approach was also observed during the investigation of #40728 (see #40728#note-17 and #40728#note-18).


Files

Actions #1

Updated by Go MAEDA about 5 hours ago

  • Subject changed from Optimize Project.allowed_to_condition by `replacing projects.status <> ...` with `projects.status IN (...)` to Optimize Project.allowed_to_condition by replacing `projects.status <> ...` with `projects.status IN (...)`
Actions #2

Updated by Holger Just about 3 hours ago

Looks good to me, thanks!

Actions

Also available in: Atom PDF