Wait statistics, in the context of SQL Server, refer to the amount of time that a query spends waiting to access data in the database. When a client application requests data from the database, the request is placed in a queue and the client application must wait for its turn to access the data. The time that the query spends waiting is called a "wait" and is tracked by SQL Server. This information can be used to identify potential performance bottlenecks and optimize the performance of the database. Wait statistics are commonly used by database administrators to diagnose and troubleshoot performance issues in SQL Server.
The PREEMPTIVE_OS_WRITEFILEGATHER wait type in SQL Server is a type of wait that occurs when a task is waiting for a write operation to complete. In SQL Server, write operations are used to write data to disk. When a task is in the PREEMPTIVE_OS_WRITEFILEGATHER wait state, it is waiting for a write operation to complete before it can continue execution. This wait type is typically only seen when write operations are being performed in the database.