Search - slow, high database load


I have an instance installed in the Owncloud era :slight_smile: … everything runs smoothly but since NC ver. 20.x every search produces high load on database and sometimes I have to restart DB to get the instance back.

eg. click on Users and search for a user… it searches not only users but contacts, files etc. and usually it gets stuck.

It’s VPS with 4GB RAM + LDAP login + 1000+ users

Nextcloud version: 21.0.3
Operating system and version: Ubuntu 18.01
Nginx version: 1.14.0
MariaDB version: 10.4
PHP version: 7.4

I suspect that my VPS instance lacks resources :slight_smile: but how can I check that… I would like to try to optimize DB first but not sure where to start.

Also, is it possible to disable unified search? if I search users I would like to see just users as a result.

It’s a known issue with the unified search, particularly (specifically?) for files. If you have a lot of files the search can’t cope. Rumours are NC22 might have some performance improvements but not that restores the performance of the old search.

Thanks… maybe elasticsearch is a right direction then.