|
so, we should be clear that the noPadding can be used from createCollection as well as from the collMod cmd.
e.g.
db.createCollection('jared', {noPadding:true})
|
and:
db.jared.runCommand("collMod", {noPadding:true})
|
To verify the setting has been correctly set, you can check collection stats:
> db.jared.stats()
|
{
|
"ns" : "dan.jared",
|
"count" : 0,
|
"size" : 0,
|
"numExtents" : 1,
|
"storageSize" : 8192,
|
"nindexes" : 1,
|
"lastExtentSize" : 8192,
|
"paddingFactor" : 1,
|
"paddingFactorNote" : "paddingFactor is unused and unmaintained in 2.8. It remains hard coded to 1.0 for compatibility only.",
|
"userFlags" : 2, <== This means noPadding is set
|
"totalIndexSize" : 8176,
|
"indexSizes" : {
|
"_id_" : 8176
|
},
|
"ok" : 1
|
}
|
> db.jared.stats()
|
{
|
"ns" : "dan.jared",
|
"count" : 0,
|
"size" : 0,
|
"numExtents" : 1,
|
"storageSize" : 8192,
|
"nindexes" : 1,
|
"lastExtentSize" : 8192,
|
"paddingFactor" : 1,
|
"paddingFactorNote" : "paddingFactor is unused and unmaintained in 2.8. It remains hard coded to 1.0 for compatibility only.",
|
"userFlags" : 0, <== this means use the default (aka, powerOf2)
|
"totalIndexSize" : 8176,
|
"indexSizes" : {
|
"_id_" : 8176
|
},
|
"ok" : 1
|
}
|
|