Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Is any of that really less the case with NoSQL?


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.


I'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.


Up 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-indexe...





Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: