A POCO update in OrmLite executes SQL like this example:

(@P1 varchar(1043),@P2 varchar(6))
UPDATE table 
SET [email protected] 
WHERE [email protected]

But it leads to multiple query plans based on different @P1 and @P2 values with varying parameter lengths.

So, what's the best way(s) to specify data types/lengths for parameterized queries in Ormlite, so that query plans are cached properly, and avoids multiple query plans due to variable parameter lengths?

Here's a similar situation with having variable length strings: https://dba.stackexchange.com/questions/216330/parameterized-query-creating-many-plans

0 Answers