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.