Skip to content
This repository has been archived by the owner on Nov 14, 2023. It is now read-only.

Delete unused indexes created in mongodb #1163

Open
ka1fe1 opened this issue Nov 5, 2019 · 1 comment
Open

Delete unused indexes created in mongodb #1163

ka1fe1 opened this issue Nov 5, 2019 · 1 comment
Assignees
Labels
Backend explorer-backend Improvement Improvement

Comments

@ka1fe1
Copy link
Collaborator

ka1fe1 commented Nov 5, 2019

There are some indexes which never used by query in Mongodb, but these indexes will slow down the speed of insert, update and delete operation. so, there have need to delete these indexes

@ka1fe1 ka1fe1 added the Improvement Improvement label Nov 5, 2019
@ka1fe1 ka1fe1 added the Backend explorer-backend label Nov 5, 2019
@weichang-x
Copy link
Collaborator

weichang-x commented Nov 15, 2019

db.tx_common.dropIndex("from");
db.tx_common.dropIndex("to");
db.ex_power_change.drop();
db.ex_uptime_change.drop();
db.ex_config.dropIndex({"env_nm": 1, "chain_id": 1}, {"unique": true, "background": true});
db.ex_config.createIndex({"env": 1, "chain_id": 1}, {"unique": true, "background": true});

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Backend explorer-backend Improvement Improvement
Projects
None yet
Development

No branches or pull requests

2 participants