The conventional way to determine if a SQL Server is using read committed snapshot is a query similar to the following:
SELECT is_read_committed_snapshot_on FROM sys.databases where database_id = db_id( )
At present our system runs this query for each new connection it establishes (which it should not, but that’s a different problem), but the above query is actually quite slow. It can take up to 8 milliseconds.
Looking at the query plan shows a substantial power of work being done to achieve the above.
Is there a more efficient way to determine this information, or should I just resign myself to trying to reduce the number of times I run this query instead?