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

Improve inline permission checks in MySQL by adding index for ownerId column

    Details

      Description

      Currently, Liferay permission checks are done as follows:

      SELECT FROM table INNER JOIN ResourcePermission ON ([$OWNER_CHECK$] OR ([$REGULAR_CHECK$]) WHERE clause

      The owner check uses the ownerId column. By default, Liferay attempts to add indexes to all of the columns used by both the owner check and the regular check, but in MySQL, this index ultimately exceeds the 1000 byte limit permitted for an index column. As a result, there is no index on the ownerId column, and any

      As an alternative solution, we can add smaller indexes that will still provide a substantial performance benefit for the INNER JOIN.

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Days since last comment:
                  6 years, 29 weeks ago

                  Packages

                  Version Package
                  6.0.X EE