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...
Raksha112
May 15, 2023Copper Contributor
You need to check as the N prefix is used for Unicode character data. As UUID is not Unicode, so you can't use the N prefix while passing the UUID parameter.
As you want to do minimal index scanning, you must avoid using the prefix N as a parameter will be a proper UUID and will avoid performance issues by unnecessary conversions.
As you want to do minimal index scanning, you must avoid using the prefix N as a parameter will be a proper UUID and will avoid performance issues by unnecessary conversions.