-
-
Notifications
You must be signed in to change notification settings - Fork 174
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #45 from marcingminski/development
v1.1.6833.36316 PowerBI Disk utilisation and performance tweaks
- Loading branch information
Showing
11 changed files
with
179 additions
and
1,366 deletions.
There are no files selected for viewing
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
CREATE TABLE [dbo].[logger_disk_utilisation_volume] | ||
( | ||
[volume_name] nvarchar(255) not null, | ||
[volume_label] nvarchar(255), | ||
[volume_fs] varchar(255), | ||
[volume_block_size_bytes] int, | ||
[volume_free_space_bytes] bigint, | ||
[volume_total_space_bytes] bigint, | ||
[snapshot_time] datetime not null, | ||
[snapshot_type_id] tinyint, | ||
constraint PK_disk_util_vol primary key clustered ( | ||
snapshot_time, volume_name | ||
), | ||
constraint FK_disk_util_vol_snapshot_header foreign key ([snapshot_time],[snapshot_type_id]) references [dbo].[sql_perf_mon_snapshot_header]([snapshot_time],[snapshot_type_id]) on delete cascade | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
CREATE FUNCTION [dbo].[ufn_time_intervals] | ||
( | ||
@snapshot_type_id tinyint = null, | ||
@interval_minutes smallint = 15, | ||
@report_window int = 4, | ||
@report_end_time datetime = '2099-12-31' | ||
) | ||
RETURNS TABLE | ||
AS RETURN ( | ||
select | ||
[spapshot_interval_start] | ||
, [snapshot_interval_end] = dateadd(mi, @interval_minutes, [spapshot_interval_start]) | ||
, [first_snapshot_time] = MIN(i.snapshot_time) | ||
, [last_snapshot_time] = MAX(i.snapshot_time) | ||
, [snapshot_age_hours] = datediff(hour,dateadd(mi, @interval_minutes, [spapshot_interval_start]),GETDATE()) | ||
, [report_time_interval_minutes] = @interval_minutes | ||
, s.[snapshot_type_id] | ||
from [dbo].[sql_perf_mon_snapshot_header] s | ||
inner join ( | ||
select | ||
[snapshot_time] | ||
, [spapshot_interval_start] = convert(datetime,dateadd(mi,(datediff(mi,0, [snapshot_time])/ @interval_minutes) * @interval_minutes,0)) | ||
, [report_time_interval_minutes] = @interval_minutes | ||
, [snapshot_type_id] | ||
from [dbo].[sql_perf_mon_snapshot_header] | ||
where snapshot_type_id = isnull(@snapshot_type_id,snapshot_type_id) | ||
and snapshot_time >= DATEADD(HOUR, -@report_window, @report_end_time) | ||
and snapshot_time <= @report_end_time | ||
) i | ||
on s.snapshot_time > [spapshot_interval_start] | ||
and s.snapshot_time <= dateadd(mi, @interval_minutes, [spapshot_interval_start]) | ||
and i.[snapshot_type_id] = s.[snapshot_type_id] | ||
where s.snapshot_type_id = isnull(@snapshot_type_id,s.snapshot_type_id) | ||
and dateadd(mi, @interval_minutes, i.[spapshot_interval_start]) > DATEADD(HOUR, -@report_window, @report_end_time) | ||
and dateadd(mi, @interval_minutes, i.[spapshot_interval_start]) <= @report_end_time | ||
group by [spapshot_interval_start], s.snapshot_type_id | ||
) | ||
GO |
Oops, something went wrong.