documentserver_community
documentserver_community copied to clipboard
Potentially redundant indices
How to use GitHub
- Please use the 👍 reaction to show that you are affected by the same issue.
- Please don't comment if you have no relevant information to add. It's just extra noise for everyone subscribed to this issue.
- Subscribe to receive notifications on status change and new comments.
Steps to reproduce
- Install the app
Expected behaviour
Efficient database index use
Actual behaviour
Indexes that overlap each other. This can slow down write operations.
# ########################################################################
# documentserver_changes
# ########################################################################
# documentserver_change_document is a left-prefix of documentserver_change_proc
# Key definitions:
# KEY `documentserver_change_document` (`document_id`),
# KEY `documentserver_change_proc` (`document_id`,`processing`)
# Column types:
# `document_id` bigint(20) not null
# `processing` tinyint(1) not null default 0
# To remove this duplicate index, execute:
ALTER TABLE `documentserver_changes` DROP INDEX `documentserver_change_document`;
# ########################################################################
# documentserver_ipc
# ########################################################################
# Key documentserver_ipc_session ends with a prefix of the clustered index
# Key definitions:
# KEY `documentserver_ipc_session` (`session_id`,`message_id`),
# PRIMARY KEY (`message_id`),
# Column types:
# `session_id` varchar(16) not null
# `message_id` bigint(20) not null auto_increment
# To shorten this duplicate clustered index, execute:
ALTER TABLE `documentserver_ipc` DROP INDEX `documentserver_ipc_session`, ADD INDEX `documentserver_ipc_session` (`session_id`);
# ########################################################################
# documentserver_locks
# ########################################################################
# documentserver_locks_document is a left-prefix of documentserver_locks_doc_user
# Key definitions:
# KEY `documentserver_locks_document` (`document_id`),
# KEY `documentserver_locks_doc_user` (`document_id`,`user`)
# Column types:
# `document_id` bigint(20) not null
# `user` varchar(64) not null
# To remove this duplicate index, execute:
ALTER TABLE `documentserver_locks` DROP INDEX `documentserver_locks_document`;
# ########################################################################
# documentserver_sess
# ########################################################################
# documentserver_ses_doc is a left-prefix of documentserver_ses_doc_last
# Key definitions:
# KEY `documentserver_ses_doc` (`document_id`),
# KEY `documentserver_ses_doc_last` (`document_id`,`last_seen`)
# Column types:
# `document_id` bigint(20) not null
# `last_seen` bigint(20) not null
# To remove this duplicate index, execute:
ALTER TABLE `documentserver_sess` DROP INDEX `documentserver_ses_doc`;