The COLUMNSTORE_LOAD_METADATA wait type in SQL Server indicates that there is a delay in loading or refreshing the metadata associated with the columnstore index. This wait type can occur when there are changes to the underlying data in the columnstore index, and the metadata needs to be updated to reflect those changes.
In your case, if every access to a table with a columnstore index is experiencing a 2-3 second wait for COLUMNSTORE_LOAD_METADATA, it suggests that there may be an issue with the metadata loading process on that particular server.
Here are a few things you can consider to troubleshoot and resolve the issue:
Check the server configuration: Ensure that the server has sufficient resources, including CPU, memory, and disk I/O, to handle the columnstore metadata operations efficiently.
Update statistics: Make sure that the statistics for the columnstore index are up to date. Outdated statistics can impact the performance of metadata loading. You can use the UPDATE STATISTICS statement to refresh the statistics for the columnstore index.
Monitor disk performance: Slow disk I/O can contribute to delays in metadata loading. Monitor the disk performance metrics, such as average disk queue length and disk response time, to identify any potential issues.
Check for storage-related problems: If the columnstore index resides on a storage system, ensure that there are no underlying issues with the storage, such as high latency or contention.
Review maintenance activities: If there are any maintenance tasks, such as index rebuilds or statistics updates, running concurrently with user queries, it could impact the metadata loading process. Check for any conflicting maintenance activities and schedule them accordingly.
Consider applying the latest cumulative updates: Although you mentioned that you are already on SQL Server 2017 CU31, it's worth checking if there are any further updates available. Microsoft often releases updates that address performance issues and bug fixes.
If the issue persists after trying these steps, it may be helpful to involve the Microsoft support team or consult with a database administrator who has expertise in troubleshooting SQL Server performance issues. They can analyze the specific configuration and workload of your server to provide further guidance and assistance.