You are right it needs to be applied to a lot of data .
We are applying it to Material Codes ( and as some of them are literal, we cannot just convert to numeric values). We happen to have a significant number of materials.
Fact is that we have to make a join with an external (i.e. non SAP) source , where materials don't have trailing 0s.
What we observe is that since we added ltrim, process time has been multiplied by 2 to 4...