Missing indexes to speed up large installations
Moving this here so we don't forget them:
create index oc_group_user_uid on oc_group_user(uid);
create index oc_share_file_target on oc_share(file_target);
EDIT: Those are no longer needed:
create index oc_filepath on oc_filecache(storage,size);
create index oc_files_versions_user on oc_files_versions(user);
create index oc_files_trashsize_user on oc_files_trashsize(user);
Would be awesome if someone chould verify that they are actually helpful.
@butonic I have a user who entered the above for Postgresql and is monitoring.
Note, the last 2 they get the following error:
owncloud=# create index files_versions_user on files_versions(user); ERROR: functions in index expression must be marked IMMUTABLE owncloud=# create index files_trashsize_user on files_trashsize(user); ERROR: functions in index expression must be marked IMMUTABLE
That's because postgres thinks that user is a function Quote the column name accordingly.
@butonic State of this?
@ser72 Can be resolved shorter term with a custom index.
@butonic @MTRichards @ser72 @MorrisJobke I think I have explained the reason for the error. user has to be quoted, since it is a reserved word in postgres.
@DeepDiver1975 @MTRichards can you enlighten me why this has been closed? obviously these indexes are not yet in core. So who takes care of testing these?
you seriously ask why I closed something one year back? :speak_no_evil:
from my pov this issue in it self was not helpful - it contains no longer existing tables are contained wrong syntax. In addition: these optional indexes are documented - done.
In addition: these optional indexes are documented - done.
LOL the documentation is referencing this issue - this is so wrong.
Well I asked multiple times for an update on this issue and didn't get an answer, so if you think that's funny enjoy a good laugh.
well, if indexes are missing it is a bug. nothing else. users should not be forced to find missing indexas in the documentation ...
well, if indexes are missing it is a bug. nothing else. users should not be forced to find missing indexas in the documentation ...
thanks for repeating my sentences :speak_no_evil: PR are welcome
create index oc_filepath on oc_filecache(storage,size);
https://github.com/owncloud/core/commit/a339855b4c85812e0c7e35ff3f83a8534fc24289
create index oc_files_trashsize_user on oc_files_trashsize(user);
6fcd135d0e871a918b2842647385b527cb823bb2
create index oc_files_versions_user on oc_files_versions(user);
7ad0fee0b56d9ab678cbb52128d427ebd641b05e
I added the remaining indexes in #17498