4 ms·
Another small one I'd point out: You can't sort large sets on fields that aren't indexed. It's not just slow, mongo flat out refuses to do it.
by msy 16y ago
Another small one I'd point out: You can't sort large sets on fields that aren't indexed. It's not just slow, mongo flat out refuses to do it.
- piotrSikora 16y agoThis is actually awesome feature! AppEngine's Datastore requires this as well. I really wish that PostgreSQL (and other SQL databases) would allow one to enforce such policy, it's a lifesaver.
- xal 16y agoAgreed. I wish normal SQL dbs would implement a mode where index misses result in errors unless they contain some sort of opt in text.
- latch 16y agoSome "normal" SQL dbs can, at the very least, be configured to log this. Which is pretty great when you consider some can't.
- eldenbishop 16y agoMongo servers can be run in a mode that rejects the query with an error if it would result in a row scan. Very useful for safely avoiding bad queries slamming your server.