# MV\_COLLECTED\_ROW\_CHANGE\_COUNTS

This view displays the best-effort counter for the number of changes that have been observed for the table partitions over time, and are persisted to disk.

More specifically, this view contains the number of row changes (inserts, updates, and deletes) that have been applied to the table as a destination.

The write behavior to the view is controlled via the following engine variables: `change_count_write_interval` and `background_statistics_collection_interval`

| Column name                   | Description                                                                                         |
| ----------------------------- | --------------------------------------------------------------------------------------------------- |
| `table_name`                  | The name of the table.                                                                              |
| `database_name`               | The name of the database containing the table.                                                      |
| `partition`                   | The`ID`of the partition.                                                                            |
| `total_changes`               | The total cumulative number of rows changed for this table on this partition.                       |
| `last_analyzed_total_changes` | The last recorded change count, when the statistics collection was triggered based on the metadata. |

An example query related to this view:

```sql
SELECT table_name, database_name, SUM(TOTAL_CHANGES), SUM(LAST_ANALYZED_TOTAL_CHANGES) FROM MV_COLLECTED_ROW_CHANGE_COUNTS;

```

```output

+------------+---------------+---------------------+----------------------------------+
| table_name | database_name | sum (TOTAL_CHANGES) | sum(LAST_ANALYZED_TOTAL_CHANGES) |
+------------+---------------+---------------------+----------------------------------+
| t          | db1           |                   8 |                                8 |
+------------+---------------+---------------------+----------------------------------+
```

***

Modified at: October 30, 2023

Source: [/db/v9.1/reference/information-schema-reference/management/mv-collected-row-change-counts/](https://docs.singlestore.com/db/v9.1/reference/information-schema-reference/management/mv-collected-row-change-counts/)

(An index of the documentation is available at /llms.txt)
