I am running the following query on the same database 3 times in a row.
Why does it give different results ?
update testtable
set yoda_shut_dt = getdate()
where lob_fund = "LIFE"
and lob_org_risk_ind <> "RP"
The results ;
1st run;
Parse and Compile Time 0.
SQL Server cpu time: 0 ms.
Table: steve_test scan count 0, logical reads: (regular=0 apf=0 total=0), physical reads: (regular=0 apf=0 total=0), apf IOs used=0
Table: steve_test scan count 1, logical reads: (regular=16019 apf=0 total=16019), physical reads: (regular=1763 apf=14256 total=16019), apf IOs used=14256
Total writes for this command: 3516
Execution Time 12.
SQL Server cpu time: 1200 ms. SQL Server elapsed time: 8076 ms.
8550 row(s) affected.
2nd run;
Parse and Compile Time 0.
SQL Server cpu time: 0 ms.
Table: steve_test scan count 0, logical reads: (regular=0 apf=0 total=0), physical reads: (regular=0 apf=0 total=0), apf IOs used=0
Table: steve_test scan count 1, logical reads: (regular=16019 apf=0 total=16019), physical reads: (regular=3005 apf=13014 total=16019), apf IOs used=13014
Total writes for this command: 5002
Execution Time 14.
SQL Server cpu time: 1400 ms. SQL Server elapsed time: 7690 ms.
8550 row(s) affected.
Third run ;
Parse and Compile Time 0.
SQL Server cpu time: 0 ms.
Table: steve_test scan count 0, logical reads: (regular=0 apf=0 total=0), physical reads: (regular=0 apf=0 total=0), apf IOs used=0
Table: steve_test scan count 1, logical reads: (regular=16019 apf=0 total=16019), physical reads: (regular=1268 apf=14751 total=16019), apf IOs used=14751
Total writes for this command: 3588
Execution Time 10.
SQL Server cpu time: 1000 ms. SQL Server elapsed time: 8056 ms.
8550 row(s) affected.
Why does it give different results ?
update testtable
set yoda_shut_dt = getdate()
where lob_fund = "LIFE"
and lob_org_risk_ind <> "RP"
The results ;
1st run;
Parse and Compile Time 0.
SQL Server cpu time: 0 ms.
Table: steve_test scan count 0, logical reads: (regular=0 apf=0 total=0), physical reads: (regular=0 apf=0 total=0), apf IOs used=0
Table: steve_test scan count 1, logical reads: (regular=16019 apf=0 total=16019), physical reads: (regular=1763 apf=14256 total=16019), apf IOs used=14256
Total writes for this command: 3516
Execution Time 12.
SQL Server cpu time: 1200 ms. SQL Server elapsed time: 8076 ms.
8550 row(s) affected.
2nd run;
Parse and Compile Time 0.
SQL Server cpu time: 0 ms.
Table: steve_test scan count 0, logical reads: (regular=0 apf=0 total=0), physical reads: (regular=0 apf=0 total=0), apf IOs used=0
Table: steve_test scan count 1, logical reads: (regular=16019 apf=0 total=16019), physical reads: (regular=3005 apf=13014 total=16019), apf IOs used=13014
Total writes for this command: 5002
Execution Time 14.
SQL Server cpu time: 1400 ms. SQL Server elapsed time: 7690 ms.
8550 row(s) affected.
Third run ;
Parse and Compile Time 0.
SQL Server cpu time: 0 ms.
Table: steve_test scan count 0, logical reads: (regular=0 apf=0 total=0), physical reads: (regular=0 apf=0 total=0), apf IOs used=0
Table: steve_test scan count 1, logical reads: (regular=16019 apf=0 total=16019), physical reads: (regular=1268 apf=14751 total=16019), apf IOs used=14751
Total writes for this command: 3588
Execution Time 10.
SQL Server cpu time: 1000 ms. SQL Server elapsed time: 8056 ms.
8550 row(s) affected.