left join with or condition reduces query performance so what could be alternative of left join or condition
select tableb.columnA, tableb.columnB,tablec.id,tabled.id,tablee.id
from tableA tableA
LEFT JOIN tableb tableb ON ((tableb.columnA = tableA.id)
OR (tableb.columnB = tableA.id))
LEFT JOIN tablec tablec ON tablec.Id = tableb.columnA
LEFT JOIN tabled tabled ON tabled.id = tableb.columnB
LEFT JOIN tablee tablee ON tablee.Id= tableb .id
tableA.id
,tableb.columnA
andtableb.columbB
all indexed? I suspect you may find that they are not and therefore the impact of adding theOR
condition is much greater than it should be