Skip to content

Add parent index to oc_shares table #9327

@dtygel

Description

@dtygel

Steps to reproduce

  1. Have more than 100 shared files to circles in a directory A
  2. Go to apps/files and go to directory A

Expected behaviour

See the list of files in a reasonable time

Actual behaviour

It takes ages to load the files' list. Looking at long queries in mysql log, it's because the field parent is not indexed.

We've tested locally, and had an increase in performance from 1.8s for the query to 0.4s, a huge improvement by just adding the field parent as a normal index.

We don't know how to add the index to the core tables. If we can get some reference on how to do this (table oc_shares), we can submit a simple Pull Request.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions