5 ms·
Yes. The need for indices is easier to identify on NoSQL: if you want to grab a key in O(1) then you need an index. However this simplicity comes not from esch
by oneloop 10y ago
Yes. The need for indices is easier to identify on NoSQL: if you want to grab a key in O(1) then you need an index.
However this simplicity comes not from eschewing SQL but because the queries you typically demand are simpler.
- creshal 10y agoI'm not sure I follow that line of argument. If plain SQL is too low-level for you there's a wealth of ORMs that abstract away all the nitty-gritty details.
- virmundi 10y agoUp front: I'm thinking about leaving NoSQL because I hate its memory model. SQL requires joins to get a "document" back. In order to properly optimize that process, you'll want an index. Most DBs don't do that (if I understand them correctly). See 1 for details about PG. NoSQLs like Mongo lack joins. As a result you pack most of your joinable data into a document. When you need some manner of linked relation, you can store either the key to the collection, or a URI that goes through your API to that collection. In either case, you're pegging against an indexed key (probably the PK). http://dba.stackexchange.com/questions/53809/need-for-indexes-on-foreign-keys http://dba.stackexchange.com/questions/53809/need-for-indexe...
- deleted 10y ago[deleted]
- jasondc 10y agohttps://docs.mongodb.org/manual/reference/operator/aggregation/lookup/ https://docs.mongodb.org/manual/reference/operator/aggregati...