Maximum 2100 parameter support of MSSQL can lead to query failure
In MSSQL we have the problem, maximal 2100 parameters are allowed . (In Oracle it is fine.) With a large set of facilities and solution group Ids, the number of the parameters can exceed this limitation and cause db errors during ticket searching. Reference to MSSQL: https://learn.microsoft.com/en-us/sql/sql-server/maximum-capacity-specifications-for-sql-server?view=sql-server-ver16
This is a restriction from the db provider. Because of support of fine-grained-access-control, this possibility for this error to occur gets lower. For a normal user who has limited access to tickets from granted facilities, this problem might normally not happen. For an Admin User who has access to all tickets, the possible of this problem to occur is higher.
Possible solution:
-
Consider using Json Table or https://stackoverflow.com/questions/60705440/how-to-overcome-sql-server-limitation-for-in-query-parameters-count (https://learn.microsoft.com/en-us/sql/t-sql/functions/openjson-transact-sql?view=sql-server-ver15) ⇒ which is not easy, because we are using criteria builder and want to keep the query to be database agnostic.
-
Inform user he has to restrict the selection/filtering criterion as kind of workaround