Which is faster related records or go to layout look ups?
I have a very long sophisticated script.
The script calculates rates. Each customer can have up to 27 vendors and each vendor offers different pricing... so the entire script can loop up to 27 times.
I have 6 look ups per vendor to get the correct rate. Right now i have them related, so the look up stays in the current layout.
Its taking a long time. When i go through the script from the debugger, the longest delay is setting the related field (vendor Id) and committing the records.
Does anyone have experience with the two methods... which is faster?
There are way too many variables to be able to make a blanket statement as to which is faster. I suggest that you try both methods and see which is faster.
I would also suggest rethinking your design to see if you can figure out a simpler approach. That will speed things up no matter which approach you finally stick with.