??β??????????????TempDB???
???????????? ???????[ 2015/12/16 11:15:41 ] ?????????????
??????????????????????У?????????TempDB???????????????????????????Щ????TempDB???????????????
??????SQL Server?У?TempDB??????????????????????
????· ???????????hash join??work table??)
????· ????????????????????
????· ?а汾????????????????
??????????????????Щ????????????????漰???????????С???????????????????????????????????????????SQL Server????????????棬????????й????У???????????治?????????????????????TempDB????????????ν??Spill to TempDB??
???????????????????????????TempDB?????????д??
DECLARE @read BIGINT??
@write BIGINT
;
SELECT @read = SUM(num_of_bytes_read)??
@write = SUM(num_of_bytes_written)
FROM tempdb.sys.database_files AS DBF
JOIN sys.dm_io_virtual_file_stats(2?? NULL) AS FS
ON FS.file_id = DBF.file_id
WHERE DBF.type_desc = 'ROWS'
--???????????????????
SELECT tempdb_read_MB = (SUM(num_of_bytes_read) - @read) / 1024. / 1024.??
tempdb_write_MB = (SUM(num_of_bytes_written) - @write) / 1024. / 1024.??
internal_use_MB =
(
SELECT internal_objects_alloc_page_count / 128.0
FROM sys.dm_db_task_space_usage
WHERE session_id = @@SPID
)
FROM tempdb.sys.database_files AS DBF
JOIN sys.dm_io_virtual_file_stats(2?? NULL) AS FS
ON FS.file_id = DBF.file_id
WHERE DBF.type_desc = 'ROWS'
???????????????????????ò???????μ?TempDB??y??????:
???????ò??????????????????????????TempDB??
??????
???·???
??????????????????
2023/3/23 14:23:39???д?ò??????????
2023/3/22 16:17:39????????????????????Щ??
2022/6/14 16:14:27??????????????????????????
2021/10/18 15:37:44???????????????
2021/9/17 15:19:29???·???????·
2021/9/14 15:42:25?????????????
2021/5/28 17:25:47??????APP??????????
2021/5/8 17:01:11