Quantcast
Channel: miracleDB Wiki Rss Feed
Viewing all articles
Browse latest Browse all 20

Updated Wiki: Statistics documentation

$
0
0

Statistics - function description
OBS This feature requires that you have installed til base + index pack of MiracleDB

  • stats.collectStatisticsInfo
    • This is the stored procedure that checks the statistics on your database, and adds elements to the base.scheduler table, which then will be ready to be updated.


Examples of use:

For automatic statistics maintenance, you need to schedule these two via a SQL Server Agent job:

EXEC stats.CollectStatisticsInfo
EXEC base.ExecuteTasks @ScheduleType = 'UPDATE STATISTICS'

 

This scans all statistics on all tables in all databases on the selected server:

EXEC stats.CollectStatisticsInfo 

This scans all statistics in the database with database_Id = 5:

EXEC stats.CollectStatisticsInfo @Database_id = 5 

This scans all statistics in all databases with the FULLScan option:

EXEC stats.CollectStatisticsInfo @DoFullScan = 1

 


Here is a complete list of parameters for the stored procedure, with their default values

@database_id int = 0
@object_id int = 0
@index_id int = 0
@UpdateStatsPercentage int = 10
@DoFullScan smallint = 1
@SamplePercentage int = 25


Viewing all articles
Browse latest Browse all 20

Trending Articles



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