1. Does the force_legacy_cardinality_estimation hint change cardinality for the whole query (or stored procedure) or just the section of code it's applied to? (For example, if there are multiple SELECT statements in a Stored Procedure but the hint is only on one of the SELECT statements.)
  2. Can you use the hint in views?
  1. The force_legacy_cardinality_estimation hint changes cardinality for a particular statement it is applied to, not for the whole batch or an object (SP, trigger, UDF and so on).

  2. No, you can't, because the SELECT clauses in a view definition cannot include the OPTION clause.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.