[SERVER-315] Different indexes for master and slaves Created: 25/Sep/09 Updated: 29/May/12 Resolved: 22/Mar/10 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Replication |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | Nicolas Fouché | Assignee: | Eliot Horowitz (Inactive) |
| Resolution: | Done | Votes: | 5 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Participants: |
| Description |
|
We have indexes dedicated to queries on the master and indexes dedicated to queries on the slave. Would be possible to create different indexes for a master and its slaves to save space and enhance write performance ? Original question on Google Groups: http://groups.google.com/group/mongodb-user/browse_thread/thread/c2ebf3bfd09cf44e |
| Comments |
| Comment by Eliot Horowitz (Inactive) [ 26/Apr/10 ] |
|
in a release |
| Comment by Eliot Horowitz (Inactive) [ 22/Mar/10 ] |
|
So - this is already possible using a little bit of a trick. If you start up your slave with --slave AND --master, you'll be able to create indexes on it. |
| Comment by Christian Wyglendowski [ 17/Mar/10 ] |
|
We have a fairly write heavy application and I don't want to penalize the core application or use space on the master host for extra indexes. That said, the extra indexes would be useful for some advanced querying that we'd like to do. If would be useful to be able to define the additional indexes only on the slave where we plan to do the advanced querying and leave the master alone. |
| Comment by Erwan Arzur [ 25/Sep/09 ] |
|
From an "operations" point of view, having a way to tell a slave which indexes are to be replicated or not would be very interesting for us. Maybe some meta-data inside the local database that we could use to tweak the replication process ? I suppose that you already have similar data stored in the slave's local database (as i had to remove it to have one slave connect to another master) ... |
| Comment by Nicolas Fouché [ 25/Sep/09 ] |
|
Our perfect use case:
|