Uploaded image for project: 'PUBLIC - Liferay Portal Community Edition'
  1. PUBLIC - Liferay Portal Community Edition
  2. LPS-49427

Change Query which is used in containsTableMapping method

    Details

    • Branch Version/s:
      6.2.x
    • Backported to Branch:
      Committed

      Description

      In case that huge number of user are registered in Liferay database,
      a processing time is very long when adding a user.

      In our test,
      when 20,000 user are registered,
      a processing time is about 3-4 sec.
      when 50,000 user are registered,
      a processing time is about 6-7 sec.

      I think it is because of containsTableMapping method in TableMapperImpl class.

      In this method, getPrimaryKeys method is called and in getPrimaryKeys method, query which is defined by getRightPrimaryKeysSqlQuery is executed just like
      "SELECT userId FROM Users_Roles WHERE roleId = ?"
      And then acquired userId lists is checke by Arrays,binarySearch in containsTableMapping.

      I think executed query should be
      "SELECT userId FROM Users_Roles WHERE roleId = ? and userId = ?"
      If so, containsTableMapping method won't call Arrays.binarySearch method.
      And a processing time is quite shorter.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              albert.lee Albert Lee
              Reporter:
              terunao.nakura TERUNAO NAKURA
              Recent user:
              Kiyoshi Lee
              Participants of an Issue:
              Votes:
              7 Vote for this issue
              Watchers:
              10 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Packages

                  Version Package
                  6.2.X EE
                  7.0.0 M7