[SERVER-904] make stats() work Created: 09/Dec/09 Updated: 12/Jul/16 Resolved: 27/Jan/10 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Sharding |
| Affects Version/s: | None |
| Fix Version/s: | 1.3.5 |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | Eliot Horowitz (Inactive) | Assignee: | Mathias Stearn |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Participants: |
| Comments |
| Comment by auto [ 27/Jan/10 ] |
|
Author: {'login': 'RedBeard0531', 'name': 'Mathias Stearn', 'email': 'mathias@10gen.com'}Message: sharding: Don't use count() for stats() |
| Comment by Eliot Horowitz (Inactive) [ 27/Jan/10 ] |
|
stats should be fast - and therefore not use the slow (correct) count |
| Comment by auto [ 27/Jan/10 ] |
|
Author: {'login': 'RedBeard0531', 'name': 'Mathias Stearn', 'email': 'mathias@10gen.com'}Message: Sharded db.c.stats() |
| Comment by Mathias Stearn [ 27/Jan/10 ] |
|
Currently using the count command to get an accurate result. Since sharded count() is very slow on large collections maybe this should just sum the individual counts and use that as a "good enough" result. |
| Comment by Eliot Horowitz (Inactive) [ 27/Jan/10 ] |
|
I think it should do both. |
| Comment by Mathias Stearn [ 27/Jan/10 ] |
|
Should size and storageSize simply sum the values from the shards or should it try to take migrating data into account? |