[Database] SQL server enables IFI function

This morning, someone from the Data warehouse department told me that the usual Data loading time is normal, but the loading time last night was much longer than usual. Is there something wrong with the database?

I checked the database carefully and found that yesterday's data file MDF file was full, and the database automatically added 10GB to enlarge this data file. I followed to further check the IFI settings and found that this setting was not enabled. It is almost certain that this is the problem.

What is IFI? IFI is Instant file initialization. When the database wants to obtain hard disk space to expand data files, the system will fill the obtained hard disk space one by one with the number 0, which is called "zero out the disk". If it is small The small 1MB may be painless or itchy. But if it is 10 GB or more of the hard disk space, it will take a while to wait for the system to fill the hard disk with the number 0. If the database is enabled with IFI, SQL server will omit this zero out process. In contrast, the database does not need to sit there and wait for the completion of this process. So generally speaking, when setting up the database, especially the data warehousing, the IFI function will be enabled.

But are there any disadvantages to enabling this feature? The answer is yes, there will be data security considerations. Because the zero out disk action is omitted, the newly acquired hard disk space will not be completely deleted. Those who are interested can use special methods to read the data that should have been deleted. So there are security considerations. But many things have advantages and disadvantages, and you still need to weigh the proportions of advantages and disadvantages to make the best setting choice.

Guess you like

Origin blog.csdn.net/wlcs_6305/article/details/114922584