Hi folks
I'm curious why this is happening and haven't spotted anything similar on the boards yet. Every time I test my trigger the execution time bloats from 0ms to up to 2 seconds.
I've written and tuned the trigger, which is down to about 16ms when I update the table with a single row - (we only ever update / insert a single row at a time as thats how the data is coming in from a legacy system)
I've siphoned off 1000 records from the production server to simulate updates using real data. I've written a while loop to loop through the test dataset and execute a stored procedure. Part of this stored procedure will update / insert into the table.
So far, so good, when there is only a single row in the dataset. As soon as I attempt to loop through 1000, the execution time grows. Im not sure why, and wonder if anyone can suggest causes for this.
I'm only interested in and recording the time within the trigger which I've captured at the start and just before the end of the trigger then inserted into a table, therefore, my test while loop shouldnt affect the performance results theoretically.....
Any ideas welcome
Cheers
"There are only two lasting bequests we can hope to give our children; one of these is roots, the other wings" - Hodding Carter
I'm curious why this is happening and haven't spotted anything similar on the boards yet. Every time I test my trigger the execution time bloats from 0ms to up to 2 seconds.
I've written and tuned the trigger, which is down to about 16ms when I update the table with a single row - (we only ever update / insert a single row at a time as thats how the data is coming in from a legacy system)
I've siphoned off 1000 records from the production server to simulate updates using real data. I've written a while loop to loop through the test dataset and execute a stored procedure. Part of this stored procedure will update / insert into the table.
So far, so good, when there is only a single row in the dataset. As soon as I attempt to loop through 1000, the execution time grows. Im not sure why, and wonder if anyone can suggest causes for this.
I'm only interested in and recording the time within the trigger which I've captured at the start and just before the end of the trigger then inserted into a table, therefore, my test while loop shouldnt affect the performance results theoretically.....
Any ideas welcome
Cheers
"There are only two lasting bequests we can hope to give our children; one of these is roots, the other wings" - Hodding Carter