MongoDB add fields of low cardinality to compound indexes?
问题 I have read putting indexes on low cardinality fields is pointless. Would this hold true for a compound index as such: db.perms.createIndex({"owner": 1, "object_type": 1, "target": 1}); With queries as such: db.perms.find({"owner": "me", "object_type": "square"}); db.perms.find({"owner": "me", "object_type": "circle", "target": "you"}); The amount of distinct object_type 's would grow over time (probably no more than 10 or 20 max) but would only start out with about 2 or 3. Similarly would a