[SERVER-25667] How to get the number of key/value pairs in an index? Created: 17/Aug/16 Updated: 17/Aug/16 Resolved: 17/Aug/16 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Admin, Index Maintenance, Shell, WiredTiger |
| Affects Version/s: | 3.3.5 |
| Fix Version/s: | None |
| Type: | Question | Priority: | Trivial - P5 |
| Reporter: | George Thompson | Assignee: | Unassigned |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Participants: |
| Description |
|
Windows 10 I want the statistic
which is equal to "btree_entries" from bt_stat.c. (I recognize this is "really, really expensive"). I run this in mongo:
and mongod reports it was successful:
which, presumably, sets WT_CONN_STAT_ALL so that btree_entries will be collected. According to the documentation, I have to use the db.adminCommand. "You can only set this parameter using the setParameter command and not using the command line or configuration file option." But when I then run:
I still get: "number of key/value pairs" : 0, |
| Comments |
| Comment by Daniel Pasette (Inactive) [ 17/Aug/16 ] | |||||||||||||||||||
|
Here's the documentation link: | |||||||||||||||||||
| Comment by George Thompson [ 17/Aug/16 ] | |||||||||||||||||||
|
C++11 Driver 3.0.1 – I believe the runCommand will do the trick. | |||||||||||||||||||
| Comment by Daniel Pasette (Inactive) [ 17/Aug/16 ] | |||||||||||||||||||
|
which driver are you using? | |||||||||||||||||||
| Comment by George Thompson [ 17/Aug/16 ] | |||||||||||||||||||
|
Thanks pasette. Now I'll go and figure out how to run that with the C++ driver. | |||||||||||||||||||
| Comment by Daniel Pasette (Inactive) [ 17/Aug/16 ] | |||||||||||||||||||
|
Hi George,
|