Timeline for Does changing a parameter value in a stored procedure before the query affect the cardinality estimate?
Current License: CC BY-SA 4.0
4 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Sep 2, 2020 at 15:58 | comment | added | Dominique Boucher | yes, just noticed it and added to the answer. Paul White was right, in this case it won't affect the cardinality estimator | |
Sep 2, 2020 at 15:58 | history | edited | Dominique Boucher | CC BY-SA 4.0 |
added 193 characters in body
|
Sep 2, 2020 at 15:55 | comment | added | adam0101 |
But I'm not declaring a local variable, I'm overwriting the parameter with a new value before the query. Do you get the same result if you set @location = NULLIF(@location, '') ?
|
|
Sep 2, 2020 at 15:53 | history | answered | Dominique Boucher | CC BY-SA 4.0 |