Help! Code only works successfully when passed the same values about half of the time
I have a situation that has puzzled me for weeks. I am running logic that does a bit of back and forth to and fro the database for each time it is executed(about 20 times). The problem is that the same code works about half of the time. What could possibly be the reason for the difference in execution performance and how can I better shore that this problem is checked.
Help! Code only works successfully when passed the same values about half of the time
===

I have a situation that has puzzled me for weeks. I am running logic that does a bit of back and forth to and fro the database for each time it is executed(about 20 times). The problem is that the same code works about half of the time. What could possibly be the reason for the difference in execution performance and how can I better shore that this problem is checked.