<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <title>ResourcePermission Table</title>
  <link rel="self" href="https://liferay.dev/c/message_boards/find_thread?p_l_id=119785294&amp;threadId=15726252" />
  <subtitle>ResourcePermission Table</subtitle>
  <id>https://liferay.dev/c/message_boards/find_thread?p_l_id=119785294&amp;threadId=15726252</id>
  <updated>2026-04-04T20:40:28Z</updated>
  <dc:date>2026-04-04T20:40:28Z</dc:date>
  <entry>
    <title>RE: ResourcePermission Table</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=15766707" />
    <author>
      <name>Joaquin Cabal</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=15766707</id>
    <updated>2012-08-21T23:15:24Z</updated>
    <published>2012-08-21T23:15:24Z</published>
    <summary type="html">Ok, Thanks a lot!&lt;br /&gt;I&amp;#39;ll go with the posible solution on the LPS</summary>
    <dc:creator>Joaquin Cabal</dc:creator>
    <dc:date>2012-08-21T23:15:24Z</dc:date>
  </entry>
  <entry>
    <title>RE: ResourcePermission Table</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=15737420" />
    <author>
      <name>Hitoshi Ozawa</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=15737420</id>
    <updated>2012-08-20T22:02:35Z</updated>
    <published>2012-08-20T22:02:35Z</published>
    <summary type="html">I&amp;#39;ve heard about this problem too. Luckily the person detected this during test and decided to use newer liferay version.&lt;br /&gt;&lt;br /&gt;As David said, it&amp;#39;s not wise to execute sql commands in production system. I&amp;#39;ll go with the recommended solution in the LPS.</summary>
    <dc:creator>Hitoshi Ozawa</dc:creator>
    <dc:date>2012-08-20T22:02:35Z</dc:date>
  </entry>
  <entry>
    <title>RE: ResourcePermission Table</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=15729208" />
    <author>
      <name>David H Nebinger</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=15729208</id>
    <updated>2012-08-20T21:30:56Z</updated>
    <published>2012-08-20T21:30:56Z</published>
    <summary type="html">&lt;div class="quote-title"&gt;Joaquin Cabal:&lt;/div&gt;&lt;blockquote&gt;where we have o lot of duplicate entries,  the question is , the resourcepermissionid is used in any other table as a relationship?&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;Probably.  Liferay treats the database as their own black box.  FKs are not created nor enforced, and the virtual table relationships are undocumented also.&lt;br /&gt;&lt;br /&gt;That&amp;#39;s why deleting rows from the database is so precarious - there is no way to determine where rows might be referenced from what other tables.  It gets even more complex since the algorithm for permissions can be changed, so identifying your algorithm and determining which rows to delete will be somewhat overwhelming, IMHO.</summary>
    <dc:creator>David H Nebinger</dc:creator>
    <dc:date>2012-08-20T21:30:56Z</dc:date>
  </entry>
  <entry>
    <title>RE: ResourcePermission Table</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=15728743" />
    <author>
      <name>Joaquin Cabal</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=15728743</id>
    <updated>2012-08-20T20:23:56Z</updated>
    <published>2012-08-20T20:23:56Z</published>
    <summary type="html">Thanks Davis, I agree with you,  the problem is the CPU seems to be veeery busy doing queries on this table.&lt;br /&gt;I saw on the resourcePermission table doing this query:&lt;br /&gt;&lt;br /&gt;&amp;#34;select count(resourcepermissionid),&amp;#34;name&amp;#34;,primkey,roleid,actionids&lt;br /&gt;from resourcepermission&lt;br /&gt;where scope = 4&lt;br /&gt;group by &amp;#34;name&amp;#34;,primkey,roleid,actionids&lt;br /&gt;having count(resourcepermissionid) &amp;gt; 1 &lt;br /&gt;order by count(resourcepermissionid)&amp;#34;&lt;br /&gt;&lt;br /&gt;where we have o lot of duplicate entries,  the question is , the resourcepermissionid is used in any other table as a relationship?&lt;br /&gt;Thanks!&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="quote-title"&gt;David H Nebinger:&lt;/div&gt;&lt;blockquote&gt;Resource permissions are just that, they are permissions on resources.&lt;br /&gt;&lt;br /&gt;With 4000 users (active and inactive) but a lot of resources, the current resource permission record count may be accurate.&lt;br /&gt;&lt;br /&gt;That said, it is inadvisable to manipulate the Liferay database directly.  Liferay uses a database and a lucene index for storing a lot of stuff.  Failure to remove records correctly can lead to a broken system.&lt;br /&gt;&lt;br /&gt;Basically you should never have been using your production system for this kind of testing.&lt;/blockquote&gt;</summary>
    <dc:creator>Joaquin Cabal</dc:creator>
    <dc:date>2012-08-20T20:23:56Z</dc:date>
  </entry>
  <entry>
    <title>RE: ResourcePermission Table</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=15726976" />
    <author>
      <name>David H Nebinger</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=15726976</id>
    <updated>2012-08-20T18:41:21Z</updated>
    <published>2012-08-20T18:41:21Z</published>
    <summary type="html">Resource permissions are just that, they are permissions on resources.&lt;br /&gt;&lt;br /&gt;With 4000 users (active and inactive) but a lot of resources, the current resource permission record count may be accurate.&lt;br /&gt;&lt;br /&gt;That said, it is inadvisable to manipulate the Liferay database directly.  Liferay uses a database and a lucene index for storing a lot of stuff.  Failure to remove records correctly can lead to a broken system.&lt;br /&gt;&lt;br /&gt;Basically you should never have been using your production system for this kind of testing.</summary>
    <dc:creator>David H Nebinger</dc:creator>
    <dc:date>2012-08-20T18:41:21Z</dc:date>
  </entry>
  <entry>
    <title>ResourcePermission Table</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=15726251" />
    <author>
      <name>Joaquin Cabal</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=15726251</id>
    <updated>2012-08-20T17:55:36Z</updated>
    <published>2012-08-20T17:55:36Z</published>
    <summary type="html">Hi I&amp;#39;m working with a liferay portal that is already on Production.&lt;br /&gt;We hase some problem basically related to this issue: http://issues.liferay.com/browse/LPS-14135.&lt;br /&gt;&lt;br /&gt;We&amp;#39;ve entry a lot of users doing  some tests, and then we had to deleted these users. After thar the ResourcePermission table is populated with a lot of &amp;#34;obsolet data&amp;#34;. Is there a way to delete these invalid entries from the database, I mean How can I see wich entries should I delete?&lt;br /&gt;This table have like 500000 entries, and somethig like 4000 users&lt;br /&gt;&lt;br /&gt;Thanks in advance!</summary>
    <dc:creator>Joaquin Cabal</dc:creator>
    <dc:date>2012-08-20T17:55:36Z</dc:date>
  </entry>
</feed>
