Home
SQL Size online help Prev Page Prev Page
Introduction
About SQL Size
Version history
Contact us
User Guide
Architecture
Licensing
Installation
System requirements
Reference Guide
The SQL Size Agent service
The SQL Size Configuration application
SQL Server instances
Data collection schedule
Reports and emails
Report template
Data storage
Alerts
Script editor
Useful shortcuts
Activating your license
The SQL Size database
The SQL Size GUI
The Overview page
Export overview
Database analysis
Alerts history
Error history
Scripting
Data types
Script structure
Language basics
Debugging
Global variables
Functions
Alert functions
RaiseAlert
RaiseConditionalAlert
AddAlertDetails
Mathematical functions
Power
String formatting functions
FormatBytes
FormatFloat
Support functions
String functions
Date and time functions
Date-Time format strings
Class reference
TBaseClass
Properties
AverageDailyGrowth
Name
ObjectType
Size
SizeDesc
Tag
TInstance
Properties
Database
DatabaseByName
DatabaseCount
DatabaseDataSize
DatabaseExists
DatabaseFilestreamSize
DatabaseLogSize
DatabaseSize
PathCount
Path
TDatabase
Properties
DataSize
DBFile
DBFileCount
Filegroup
FilegroupCount
FilestreamSize
LogSize
TFilegroup
Properties
DBFile
DBFileCount
FilegroupType
TDBFile
Properties
Filegroup
FileType
Growth
IsPercentGrowth
MaxSize
Path
PhysicalName
TPath
Properties
FreeSpace
Enumerations
TFileType
TFilegroupType
TObjectType
Records
TGrowthStats
Constants

AverageDailyGrowth

Returns the object average daily growth in bytes. The GrowthStats record will return more details on the current and previous data points.

Syntax:
function AverageDailyGrowth(EarliestDataPointInHours: Integer; var GrowthStats: TGrowthStats): Integer;  
 
Notes:
The EarliestDataPointInHours indicates the earliest data point you want to use to calculate the growth statistics. Say the current timestamp is 21 January 09:00. If you use an EarliestDataPointInHours value of 168 (7 days), the scripting engine will try to use the first data point dated 14 January 09:00 or later. So if there is no data point on 14 January 09:00 but there is one at 14 January 09:30, the scripting engine will use that data point. If there is no data point from 14 January 09:00 to 21 January 09:00, the scripting engine will look for the first data point earlier than 14 January 09:00.  
 
The PreviousTimestamp member in GrowthStats will indicate the date of the historical data point used.  
 
Example:

tbaseclass_averagedailygrowth