June 26, 2026 at 12:00 am
Comments posted to this topic are about the item SQL Server Enum Implementation: A Single-Row View Strategy for Avoiding Magic Values
June 26, 2026 at 10:07 am
Congrats on your first article! This is innovative approach to dictionary values in SQL.
IMHO, the biggest benefit is not even pin-pointed: better execution plans for skewed values (parameter sniffing solution)!
Columns like %Status, %Type usually have low number of possible values (eg 10-100), and are almost always skewed - bringing random slowness due to parameter sniffing problem. It is the best NOT to parameterize such values, to use lilterals. But certain database Frameworks (EF?) and certain apps (MS NAV / Business Central) do not have ability to specify which "parameters" to turn into values, not parameters. I think there we maybe could use this technique to solve parameter sniffing and get best possible performance.
Great work!
June 26, 2026 at 10:27 am
Thanks, really appreciate your opinion, and great addition about "better execution plans for skewed values - parameter sniffing." 🙂
June 26, 2026 at 1:16 pm
Nice. I use similar setups in app-level code, but I never thought to do it in SQL Server. Definitely going into the toolbox.
June 26, 2026 at 1:17 pm
Thanks 🙂
Viewing 5 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply