The implicit conversions are caused by the computed column AltKey
:
CREATE TABLE dbo.Test
(
[sessionid] [decimal](18, 0) NOT NULL,
[sessionseqnum] [smallint] NOT NULL,
[nodeid] [smallint] NOT NULL,
[profileid] [int] NOT NULL,
[AltKey] AS
CONCAT
(
[sessionid],
[sessionseqnum],
[nodeid],
[profileid]
) PERSISTED NOT NULL,
);
Given the above simplified table, the simple statement below generates the same implicit conversion warnings given in the question:
SELECT T.*
FROM dbo.Test AS T;
From the documentation (emphasis added):
CONCAT
implicitly converts all arguments to string types before concatenation.
The warning is added when SQL Server considers a plan alternative that does not use the persisted value, but computes the value explicitly. The warning is not removed if the final plan uses the persisted value.
The warnings may be safely ignored in this case. This also applies to your execution plan, as far as I can tell - the implicit conversions involved in the CONCAT
are not adversely affecting plan choice.
Using undocumenteddocumented and unsupportedsupported trace flag 176 prevents persisted computed column expansion and removes the warnings:
SELECT *
FROM dbo.Test AS T
OPTION (QUERYTRACEON 176);
See my article Properly Persisted Computed Columns for more details.