Wednesday, 19 October 2016

UPDATE STATISTIC AT SQL SERVER

Example steps to perform Update Statistic as below;

1. Open new query on the SSMS (SQL Server Management Studio).
2. Write it the query as below
use <Database_Name>
Exec sp_updatestats

3. Select the query and click the button query.

use <Database_Name>
Exec sp_updatestats

4. On the result pane, you should see the result as below, and the status query is executed successfully.

Updating [sys].[queue_messages_1977058079]
[queue_clustered_index], update is not necessary...
{queue_secondary_index], update is not necessary...
0 index(es)/statistic(s) have been updated, 2 did not require update.

5. Done.