The EnumLastStatisticsUpdates method returns a QueryResults object enumerating the query optimizing statistics maintained on a table.
object.EnumLastStatisticsUpdates( [ IndexName ] ) as QueryResults
| Part | Description |
|---|---|
| object | Expression that evaluates to an object in the Applies To list. |
| IndexName | Optional. String naming an existing index and restricting output to the index named. |
A QueryResults object containing one result set defined by these columns.
| Column | Data type | Description |
|---|---|---|
| name | nvarchar(129) | Index name or statistics definition name. |
| last update | smalldatetime | Date and time of most recent update. When NULL, the distribution statistics have not been updated after object creation. |
Data distribution statistics are maintained for indexes defined on a table and as directed by the user. By default, the EnumLastStatisticsUpdates method returns a result set containing rows referencing both indexes and system and user-defined data distribution statistics.
HRESULT EnumLastStatisticsUpdates(
LPSQLDMOQUERYRESULTS* ppResults,
SQLDMO_LPCSTR IndexName = NULL);