Optimize "Customer has a referring customer" condition, RT#74452