4 ms·
I've been migrating data from a NoSQL database into PostgreSQL for the past few weeks. Now data occupies about half the size on disk. And queries are up by a fa
by jlouis 17y ago
I've been migrating data from a NoSQL database into PostgreSQL for the past few weeks. Now data occupies about half the size on disk. And queries are up by a factor of 100. Especially the advanced ones. Note however, that I have a pretty good understanding of SQL, so I know how to optimize the queries.
One powerful aspect of SQL is that the database can optimize the query. Some NoSQL databases enforces you to write joins manually in code. Unless you really know what you are doing and spend hours on it, the query will be slow. This is exactly what I see with many of our queries. Relational databases is not the answer to everything, but I would prefer to start with one rather than a NoSQL variant. You can always migrate when things begin to get too slow (ie, when you get mad success - which you probably never do anyway)
- rapind 17y agoEnter the NoNoSQL era?
- j2d2 17y agoIn this case, two wrongs kinda make a right.
- jbellis 17y ago> Some NoSQL databases enforces you to write joins manually in code. Unless you really know what you are doing and spend hours on it, the query will be slow. Most (?) encourage denormalization instead of joins-in-code. > This is exactly what I see with many of our queries. Relational databases is not the answer to everything, but I would prefer to start with one rather than a NoSQL variant. For most application domains, I agree -- but there are plenty of companies that have essentially outgrown the relational approach already. /committer on Cassandra as well as SQLAlchemy
- mahmud 17y agoI've been migrating data from a NoSQL database That's like saying "I live in a capitalist nation and capitalism is not what it's cracked up to be." NoSQL is an ideology, and anyone you hear who uses that term is an ideologue. Please name the "NoSQL" you have been using and name the specific problems you have had with it so we can discuss matters more concretely. Just as RDBMS users prefer one above all else, so do "NoSQL" users. I have seen my fair share of them and I thought a good chunk of them where "crap" (where crap means "does not fit my mental model of the solution"; mainly because I am too naive to study the field better and appreciate what the tools are capable of, so I dismiss anything that doesn't entirely model CL's Elephant.) Last week I rolled out my own Memcached "replacement" in Common Lisp and I was spitting in bradfitz's general direction, that looney bloat monger! Yeah, my "memcached" replacement is an in-process memoizer for all the DB accessing functions. It worked until the server instance was overloaded and the load-balancer forked a second instance: then I had a problem. I wish I could suck-back all the spit I have sent in brad's general direction.
- jbellis 17y ago> NoSQL is an ideology, and anyone you hear who uses that term is an ideologue. You're sounding a little ideologue-ish yourself. :) NoSQL is a term of limited use since there is such a huge variety of non-relational database technologies, but that doesn't mean using it makes you an ideologue any more than someone using the term "dynamic languages," which is similarly broad.
- moe 17y agoWhich NoSQL database were you using and what were your particular problems?