Skip to content
Advertisement

A problem with a simple join taking too long to finish

I´m having trouble identifying who to fix this simple join.

My problem is, after adding the column B.CIDPRODUCT IS NULL this query takes hours to finish.

table BO_PRICER001 rows 286537 table BO_PRODUCTCONFIG rows 7934844

on the table BO_PRICER001 exists 15329 rows with null

with B.CIDPRODUCT IS NULL the live query show this plan:

enter image description here

and without this column the plan is:

enter image description here

I already try to force an index and switch to a subquery but the problem continues.

if possible, I really appreciate a help.

Sample of data from PRICER001

Sample of data from PRODUCTCONFIG

Advertisement

Answer

OR kills performance. A typical workaround are multiple LEFT JOIN. Perhaps:

I´m having trouble identifying who to fix this simple join.

User contributions licensed under: CC BY-SA
4 People found this is helpful
Advertisement