Quantcast
Channel: SQL Server Database Engine forum
Viewing all articles
Browse latest Browse all 12963

rowmodctr not working properly in sysindexes

$
0
0

Hi Team,

DROp Table t1
GO
CREATE TABLE t1 (c1 INT, c2 INT, c3 INT);
GO
INSERT INTO t1 VALUES (1, 1, 1);
GO 
CHECKPOINT
GO
SELECT [name], [rowmodctr] FROM sysindexes WHERE [id] = OBJECT_ID ('t1');

-->rowmodctr=1



UPDATE t1 SET c1 = 4;
UPDATE t1 SET c1 = 5;
UPDATE t1 SET c1 = 6;
UPDATE t1 SET c2 = 2;
UPDATE t1 SET c2 = 3;
UPDATE t1 SET c3 = 2;

SELECT     [name],     [rowmodctr]  FROM sysindexes WHERE [id] = OBJECT_ID ('t1');
GO   -->rowmodctr = 4

--It should be 7 as there are total 7 updates to this table

--Wanted to reset back to 0 so executed below command

sp_updatestats

--but still getting 4 How to reset rowmodctr value to 0

Regards,


Manish


Viewing all articles
Browse latest Browse all 12963

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>