When/Why is the value of RCModified Updated in sysrowsetcolumns?

  • I'm doing some work on stats this week and was digging into the undocumented sysrowsetcolumns (see this blog post

    select

    top 100 object_name(p.object_id) as TableName,

    src.*,

    c.name,

    c.object_id

    from sys.sysrowsetcolumns src inner join sys.partitions p on src.rowsetid = p.partition_id

    inner join sys.columns c on src.rowsetcolid = c.column_id and p.object_id = c.object_id

    The select is mine; I think it's correct, but no guarantees. What I wanted to see was the value of rcmodified change and trigger an update stats (auto stat) event, but I'm not getting the behavior I expected. To start with it seems that the value of rcmodified is updated either on a background thread or based on some threshold, when I do an update it's not immediately reflected (and sometimes seems to never show up).

    Not finding much when I search, anyone have experience with this?

  • You can *still* use rowmodcntr from sysindexes compatibility view.

    It now changes not only with "row" but also "column" changes.


    * Noel

  • I can probably use that, still hoping someone can shed light on the internals though!

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply