Uploaded image for project: 'Nuxeo Platform'
  1. Nuxeo Platform
  2. NXP-10100

Improve nx_update_read_acls on PostgreSQL

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 5.6
    • Fix Version/s: 5.7.1, 5.8
    • Component/s: Core VCS
    • Environment:
      PostgreSQL

      Description

      In the nx_update_read_acls the first insert request may result in full scan on hierarchy. Adding a LIMIT 1 will prevent this:

        INSERT INTO hierarchy_read_acl
          SELECT id, md5(nx_get_read_acl(id))
          FROM (SELECT DISTINCT(hierarchy_id) AS id
              FROM aclr_modified
              WHERE is_new AND
                  EXISTS (SELECT 1 FROM hierarchy WHERE aclr_modified.hierarchy_id=hierarchy.id LIMIT 1)) AS uids;
      
      

        Attachments

          Activity

            People

            • Assignee:
              bdelbosc Benoit Delbosc
              Reporter:
              bdelbosc Benoit Delbosc
              Participants:
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: