我下面有以下列。我不太熟悉 OVER 函数。问题是,列usage_change_mb是每日变化(来自每日快照)还是所有正在评估的快照的平均变化?
这是专栏:
( LAST_VALUE ( reservedpages ) OVER ( PARTITION BY instance_name, database_name ORDER BY instance_name ASC, database_name ASC, snapshot_time ASC ROWS BETWEEN CURRENT ROW AND UNBOUNDED FOLLOWING )
- /* subtract */
FIRST_VALUE ( reservedpages ) OVER ( PARTITION BY instance_name, database_name ORDER BY instance_name ASC, database_name ASC, snapshot_time ASC ROWS BETWEEN CURRENT ROW AND UNBOUNDED FOLLOWING ) ) * 8 / 1048576.0
AS usage_change_mb