Parameters should use the length of the underlying model column where available #2622
Closed
simonsabin
started this conversation in
General
Replies: 2 comments 2 replies
-
Can you please create an issue so that it can be properly tracked and fixed? |
Beta Was this translation helpful? Give feedback.
2 replies
-
MOved discussion to issue #2626 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Currently string and binary parameters are added without a length meaning you get multiple queries and plans causing bloat and is impossible to manage from a query store plan perspective as one, you ened up with 100s of queries with the same hash, but are different queries and also differing plans. Query is just varying by the length of the definition of the parameter. (See below)
The DBConnectionParam needs a length and the creation of params should use length where possible.
This could obtain the length of the underlaying model as it does to get the type of the underlying model column
data-api-builder/src/Core/Resolvers/BaseQueryStructure.cs
Line 120 in af09e10
Beta Was this translation helpful? Give feedback.
All reactions