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_XE_GETTARGETSTATE wait type in SQL Server is a type of wait that occurs when a task is waiting for information about an Extended Events session. Extended Events is a feature in SQL Server that allows users to collect data about events that occur in the database engine. When a task is in the PREEMPTIVE_XE_GETTARGETSTATE wait state, it is waiting for information about the state of an Extended Events session before it can continue execution. This wait type is typically only seen when working with Extended Events.