There seems to be two options on Win32 for preallocating disk space to files.
Basically, I want a equivilent to posix_fallocate or the ever wonderful xfsctl XFS_IOC_RESVSP64 call.
The idea being to (quickly) create a large file on disk that is stored efficiently (i.e. isn’t fragmented).
From SQL, you’d do something like “CREATE LOGFILE GROUP lg1 ADD UNDOFILE ‘uf1′ INITIAL_SIZE 1G;” and expect a 1GB file on disk. One way of getting this is calling write() (or …[Read more...]