??????????????м??????????????40000????????????????8K??С??????????????320MB?????????????????????????????????????в?????SQL Server????2????????????????????????160M????????????????????160M???????
-- Insert 40.000 records?? results in about 312MB data (40.000 x 8KB / 1024 = 312??5MB)
-- They are distributed in a round-robin fashion between the files in the file group "FileGroup1"
-- Each file will get about 160MB
DECLARE @i INT = 1
WHILE (@i <= 40000)
BEGIN
INSERT INTO Test VALUES
(
REPLICATE('x'?? 8000)
)
SET @i += 1
END
GO
????????????????????????£??????2????????????С??
???????????Щ??????????????????????????????????????????????????????ж??????????
?????????????????н???????????????????????
-- Retrieve file statistics information about the created database files
DECLARE @dbId INT
SELECT @dbId = database_id FROM sys.databases WHERE name = 'MultipleFileGroups'
SELECT
sys.database_files.type_desc??
sys.database_files.physical_name??
sys.dm_io_virtual_file_stats.* FROM sys.dm_io_virtual_file_stats
(
@dbId??
NULL
)
INNER JOIN sys.database_files ON sys.database_files.file_id = sys.dm_io_virtual_file_stats.file_id
GO
????С??
??????????????????????????????????????????????????????????????????????????????????????????????????????????