Sql Enterprise
1 TopicSQL 2016 CU-8 Enterprise, Multiple query plans for same sql statment, Bug?!
Hi, for some reason the optimizer generates different plan handles (more than 40K, same plan hash) for the same SQL statement, simple parameterized insert statement . we have checked passed variables, plan attribute (set_options) and could not figure it out why the optimizer recompiles the plan each run. no option recompile hint ( or any hints). examples (both statements runs with same user options and connection string): 1 Query Plan, 1 Plan Hash. ==> as expected INSERT [dbo].[TableA]([CreateDate], [A], [B], [C], [D], [E], [F]) VALUES (@0, @1, @2, @3, @4, @5, @6) 40K Query Plans, 1 Plan Hash ==> bug? INSERT [dbo].[TableA]([CreateDate], [A], [B], [C], [D], [E], [F]) VALUES (@0, @1, @2, @3, @4, NULL, @5) is there anything else i should check or its a known/new bug? if i should report it, can anyone please elaborate how we report bugs with the new interface introduced early 2018 ( got full MSDN)? Thanks in advance!1.6KViews0likes2Comments