Skip to content
GitLab
  • Menu
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
    • Switch to GitLab Next
  • Sign in / Register
  • Mayan EDMS Mayan EDMS
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 192
    • Issues 192
    • List
    • Boards
    • Service Desk
    • Milestones
    • Requirements
  • Merge requests 9
    • Merge requests 9
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Mayan EDMSMayan EDMS
  • Mayan EDMSMayan EDMS
  • Issues
  • #741
Closed
Open
Created Jan 06, 2020 by Rob Knight@rssfed23Reporter

Search is slow on large pagesets - Limited by Postgres' single core limitations

From the Forum: https://forum.mayan-edms.com/viewtopic.php?f=7&t=1560&p=2976#p2976 Not a bug as such, but potential room for improvement.

User is experiencing searches that take 2 minutes +. They have documents containing 150k+ pages.

After diagnosing the issue it's being caused by a slow postgres. This is hindered further by postgres only being able to use 1 core for each query in 9.6.

I think there's a couple of things that could be helped from the Mayan side:

  • Optimise searching from a query perspective. This might be a Django limitation though so maybe not. Any ability to parallelize the queries can help if a user upgrades beyond postgres 9.6 would help significantly
  • Update our default Postgres versions. 10 brings Parallel queries (https://dba.stackexchange.com/questions/55019/can-a-single-postgresql-query-use-multiple-cores) and this is further improved in 11/12. Only helps if we make code changes though.

I've just ran some dockerised tests on 12 and Mayan installs okay on postgres 12 & 12.1 but then I hit !716 Mayan does run okay on 11 though, but there is no improvement to search.

I will investigate (memcached)caching options to potentially add to the documentation.

In the meantime, the Django docs mention creating indexes for full text searches https://docs.djangoproject.com/en/1.11/ref/contrib/postgres/search/#performance so perhaps that's worth looking into here also if we don't generate them already

Edited Jan 06, 2020 by Rob Knight
Assignee
Assign to
Time tracking