MS SQL 2016 or higher: Falling back to Legal Cardinality Estimation
This topic explains the behavior of Microsoft SQL Server 2016 and later versions when the query optimizer falls back to using the legacy cardinality estimation model. It covers the circumstances under which this occurs, the implications on query performance, and how to manage or disable this fallback to ensure optimal query execution plans.
If you see issues with Data Import steps and the following message
appears:
Import log last message entries: INFO: ETL from SAM::UsageFact: Start INFO: Parsing raw usage results. This may take a long time. The import job just hangs and ends only with user interruption.
Change the MS SQL Server BigFix Inventory Database setting "LEGACY_CARDINALITY_ESTIMATION" to "ON".
Perform the following steps to apply the changes:
- Stop the data import.
- Ensure that the setting in the BigFix Inventory database
LEGACY_CARDINALITY_ESTIMATIONis turned on. Use the below command:ALTER DATABASE SCOPED CONFIGURATION SET LEGACY_CARDINALITY_ESTIMATION = ON - Run the import.