WHERE condition referring to inner table of left join can be sargable

Description

Some ERP generate that type of queries

The full index scan on primary table is not necessary if const on joined table is not NULL.

Rewriting the query is hard to be done in the application because it may happen that the application is doing a lookup for NULL on left joined table

indeed query rewriting change the lookup to const or range in case the second condition is not null and propagated to the upper table

Assignee

Sergei Petrunia

Reporter

VAROQUI Stephane

Time tracking

40h

Components

Fix versions

Priority

Major
Configure