Forum Discussion
yachaoh001
May 03, 2023Copper Contributor
The primary key field of the SQLSERVER2016 table is UUID. Variable parameter passing causes a full t
For example, table1 column id is the primary key, varchar(22), ID is prefixed by N by default during parameter passing, resulting in full table scanning; select *from table1 where id = '346xPbiLLvi...
olafhelper
May 04, 2023Bronze Contributor
yachaoh001 , the literal N indicate Unicode = NVarChar and your column has the different data type varchar = ASCII. Mixing different data types in a query can cause full table/index scans.
yachaoh001
May 04, 2023Copper Contributor
If the primary key field is set to varchar type, how can I avoid index scanning caused by type conversion during value transfer