Uploaded image for project: 'i2b2 Core Software'
  1. i2b2 Core Software
  2. CORE-227

Add ability to send parameters with string based variables as varchar instead of nvarchar

    Details

    • Type: New Feature
    • Status: Closed
    • Priority: Major
    • Resolution: Completed
    • Affects Version/s: 1.7.07
    • Fix Version/s: 1.7.08
    • Component/s: CRC Cell
    • Labels:
      None
    • Rank:
      0|i0031j:
    • i2b2 Sponsored Project/s:
      i2b2 Core
    • Affects Database/s:
      SQL Server

      Description

      Currently when prepared statements are used to pass in string based variables, the parameters are sent in the SQL statement as Unicode (nvarchar) instead of varchar. The SQL Server then has to explicitly convert the nvarchar to varchar in the query. The effect is that the SQL Server optimizer may have to use an index scan instead of an index seek, which is the faster of the two.

      The solution is to add a new connection parameter to the datasource definition. The value defined for this new connection parameter will determine whether the parameters with string based variables are sent as nvarchar or varchar.

      Parameter: <connection-property name="sendStringParametersAsUnicode">
      Located in:
      Behavior:
          Value = ‘false’ the parameter will be sent as varchar
          Value = ‘true’ the parameter will continue to be sent as Unicode (‘nvarchar’)

      If the parameter is missing the system will continue with the current logic.

      IMPORTANT: This change only affects SQL Server databases.

        Attachments

          Activity

            People

            • Assignee:
              jmd86 Janice Donahoe
              Reporter:
              jmd86 Janice Donahoe
              Participant/s:
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Git Source Code