Skip to content

Commit f047b3f

Browse files
Fixed integer division and a typo
1 parent 02994b0 commit f047b3f

File tree

2 files changed

+13
-13
lines changed

2 files changed

+13
-13
lines changed

sqldb-tips/get-sqldb-tips-compat-level-100-only.sql

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,7 @@ VALUES
274274
(1, 1190, 'Transaction log IO is close to limit', 70, 'https://aka.ms/sqldbtipswiki#tip_id-1190', 'VIEW DATABASE STATE'),
275275
(1, 1200, 'Plan cache is bloated by single-use plans', 90, 'https://aka.ms/sqldbtipswiki#tip_id-1200', 'VIEW DATABASE STATE'),
276276
(1, 1210, 'Missing indexes may be impacting performance', 70, 'https://aka.ms/sqldbtipswiki#tip_id-1210', 'VIEW SERVER STATE'),
277-
(1, 1220, 'Redo queue or a secondary replica is large', 60, 'https://aka.ms/sqldbtipswiki#tip_id-1220', 'VIEW DATABASE STATE'),
277+
(1, 1220, 'Redo queue on a secondary replica is large', 60, 'https://aka.ms/sqldbtipswiki#tip_id-1220', 'VIEW DATABASE STATE'),
278278
(1, 1230, 'Data IOPS are close to workload group limit', 70, 'https://aka.ms/sqldbtipswiki#tip_id-1230', 'VIEW SERVER STATE'),
279279
(1, 1240, 'Workload group IO governance impact is significant', 40, 'https://aka.ms/sqldbtipswiki#tip_id-1240', 'VIEW SERVER STATE'),
280280
(1, 1250, 'Data IOPS are close to resource pool limit', 70, 'https://aka.ms/sqldbtipswiki#tip_id-1250', 'VIEW SERVER STATE'),
@@ -1517,14 +1517,14 @@ SELECT 1410 AS tip_id,
15171517
'tables with ', FORMAT(@NoIndexTablesMinRowCountThreshold, '#,0'),
15181518
' or more rows and no indexes: ', FORMAT(SUM(no_index_indicator), '#,0'),
15191519
@CRLF, @CRLF,
1520-
STRING_AGG(CAST(
1521-
IIF(
1522-
no_index_indicator = 1,
1523-
CONCAT(schema_name, '.', table_name),
1524-
NULL
1525-
)
1526-
AS nvarchar(max)
1527-
),
1520+
STRING_AGG(
1521+
IIF(
1522+
no_index_indicator = 1,
1523+
CONCAT(
1524+
schema_name, '.', table_name
1525+
),
1526+
NULL
1527+
),
15281528
@CRLF
15291529
),
15301530
@CRLF
@@ -2917,7 +2917,7 @@ DECLARE @crb TABLE (
29172917
-- stage XML in a table variable to enable parallelism when processing XQuery expressions
29182918
WITH crb AS
29192919
(
2920-
SELECT DATEADD(second, -0.001 * (si.cpu_ticks/(si.cpu_ticks/si.ms_ticks) - rb.timestamp), CURRENT_TIMESTAMP) AS event_time,
2920+
SELECT DATEADD(millisecond, -1 * (si.cpu_ticks/(si.cpu_ticks/si.ms_ticks) - rb.timestamp), CURRENT_TIMESTAMP) AS event_time,
29212921
TRY_CAST(rb.record AS XML) AS record
29222922
FROM sys.dm_os_ring_buffers AS rb
29232923
CROSS JOIN sys.dm_os_sys_info AS si
@@ -3102,7 +3102,7 @@ SELECT MIN(snapshot_time) AS min_snapshot_time,
31023102
MIN(blocked_task_count) AS min_blocked_task_count,
31033103
MAX(blocked_task_count) AS max_blocked_task_count,
31043104
SUM(delta_lock_wait_count) AS total_lock_waits,
3105-
SUM(delta_lock_wait_time_ms) / 1000 AS total_lock_wait_time_seconds
3105+
SUM(delta_lock_wait_time_ms) / 1000. AS total_lock_wait_time_seconds
31063106
FROM pre_packed_blocking_snapshot
31073107
WHERE blocking_indicator = 1
31083108
GROUP BY grouping_helper

sqldb-tips/get-sqldb-tips.sql

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,7 @@ VALUES
262262
(1, 1190, 'Transaction log IO is close to limit', 70, 'https://aka.ms/sqldbtipswiki#tip_id-1190', 'VIEW DATABASE STATE'),
263263
(1, 1200, 'Plan cache is bloated by single-use plans', 90, 'https://aka.ms/sqldbtipswiki#tip_id-1200', 'VIEW DATABASE STATE'),
264264
(1, 1210, 'Missing indexes may be impacting performance', 70, 'https://aka.ms/sqldbtipswiki#tip_id-1210', 'VIEW SERVER STATE'),
265-
(1, 1220, 'Redo queue or a secondary replica is large', 60, 'https://aka.ms/sqldbtipswiki#tip_id-1220', 'VIEW DATABASE STATE'),
265+
(1, 1220, 'Redo queue on a secondary replica is large', 60, 'https://aka.ms/sqldbtipswiki#tip_id-1220', 'VIEW DATABASE STATE'),
266266
(1, 1230, 'Data IOPS are close to workload group limit', 70, 'https://aka.ms/sqldbtipswiki#tip_id-1230', 'VIEW SERVER STATE'),
267267
(1, 1240, 'Workload group IO governance impact is significant', 40, 'https://aka.ms/sqldbtipswiki#tip_id-1240', 'VIEW SERVER STATE'),
268268
(1, 1250, 'Data IOPS are close to resource pool limit', 70, 'https://aka.ms/sqldbtipswiki#tip_id-1250', 'VIEW SERVER STATE'),
@@ -3100,7 +3100,7 @@ SELECT MIN(snapshot_time) AS min_snapshot_time,
31003100
MIN(blocked_task_count) AS min_blocked_task_count,
31013101
MAX(blocked_task_count) AS max_blocked_task_count,
31023102
SUM(delta_lock_wait_count) AS total_lock_waits,
3103-
SUM(delta_lock_wait_time_ms) / 1000 AS total_lock_wait_time_seconds
3103+
SUM(delta_lock_wait_time_ms) / 1000. AS total_lock_wait_time_seconds
31043104
FROM pre_packed_blocking_snapshot
31053105
WHERE blocking_indicator = 1
31063106
GROUP BY grouping_helper

0 commit comments

Comments
 (0)