We're updating the issue view to help you get more done. 

SQL Backend: No left outer join is generated when accessing the primary key property of a relation property when the foreign key is on the left side of the relation

Description

Example query:

Query generated before:

Query generated after the change:

This change was made as a performance improvement: queries without left outer joins often show much better query plans.

Note that the optimized version will result in different behavior if the query is executed against tables with invalid foreign keys. With an invalid foreign key, the left outer join would cause the related entity's ID to become all NULLs, whereas the new behavior will simply return the (invalid) foreign key. However, the performance benefit is deemed important enough to allow for this inconsistency. (Invalid foreign keys are often a sign of corrupted data anyway.)

Status

Assignee

Fabian Schmied

Reporter

Fabian Schmied

Labels

Components

Fix versions

Priority

Normal
Configure