gpt4 book ai didi

sql-server - 什么是 NDF 文件?

转载 作者:行者123 更新时间:2023-12-01 17:33:01 25 4
gpt4 key购买 nike

SQL Server 使用 .mdf 作为数据文件,使用 .ldf 作为日志文件,但是 .ndf 文件是什么?

这些文件有什么好处?

最佳答案

来自Files and Filegroups Architecture

辅助数据文件

辅助数据文件构成除主数据文件之外的所有数据文件。有些数据库可能没有任何辅助数据文件,而其他数据库则有多个辅助数据文件。 建议辅助数据文件的文件扩展名为 .ndf。

同样来自file extension NDF - Microsoft SQL Server secondary data file

参见Understanding Files and Filegroups

Secondary data files are optional, are user-defined, and store user data. Secondary files can be used to spread data across multiple disks by putting each file on a different disk drive. Additionally, if a database exceeds the maximum size for a single Windows file, you can use secondary data files so the database can continue to grow.

The recommended file name extension for secondary data files is .ndf.

/

For example, three files, Data1.ndf, Data2.ndf, and Data3.ndf, can be created on three disk drives, respectively, and assigned to the filegroup fgroup1. A table can then be created specifically on the filegroup fgroup1. Queries for data from the table will be spread across the three disks; this will improve performance. The same performance improvement can be accomplished by using a single file created on a RAID (redundant array of independent disks) stripe set. However, files and filegroups let you easily add new files to new disks.

关于sql-server - 什么是 NDF 文件?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2707403/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com