SQL DB Service (DTU): Query Performance insights: different statements logged

Florian Pitschi 1 Reputation point
2021-07-22T06:58:48.287+00:00

Hi,

I insert records into an SQL DB (service based on DTU) table, always using the same SQL-insert statement, just with different field values.
In the Query Performance insights, for one field "temperature", for the displayed queries, seems there are different nvarchar(n) used for "temperature"- the field itself on DB table level is of type "float".

(@麦麦 _id nvarchar(8),@mytimestamp datetime,@temperature nvarchar(8),@Asdf int,@麦麦 _state nvarchar(1))INSERT INTO dbo.sensordata (machine_id,mytimestamp,temperature,pressure,machine_state) values (@麦麦 _id,@mytimestamp,@temperature,@Asdf ,@麦麦 _state)

(@麦麦 _id nvarchar(8),@mytimestamp datetime,@temperature nvarchar(4),@Asdf int,@麦麦 _state nvarchar(1))INSERT INTO dbo.sensordata (machine_id,mytimestamp,temperature,pressure,machine_state) values (@麦麦 _id,@mytimestamp,@temperature,@Asdf ,@麦麦 _state)

(@麦麦 _id nvarchar(8),@mytimestamp datetime,@temperature nvarchar(7),@Asdf int,@麦麦 _state nvarchar(1))INSERT INTO dbo.sensordata (machine_id,mytimestamp,temperature,pressure,machine_state) values (@麦麦 _id,@mytimestamp,@temperature,@Asdf ,@麦麦 _state)

I wonder why the float field is logged as varchar(n) with different n: shouldnt be the type of the field always be logged as "float"?

ThX!

Azure SQL Database
{count} votes

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.