Live data from Hacker News

Poll: What database does your company use?

news.ycombinator.com

211–220 of 378 posts

Re: Poll: What database does your company use?

#211
post #79

I'd vote for PostgreSQL multiple times if I could. I'm a consultant DBA (-ish; I do other stuff as well, but that's what puts most of the food on my table), and have multiple clients using pg.

Why do you use pgsql over mysql? I've used mysql a lot, and pgsql a little. I can't tell the difference, other than pgsql being slower and having less support. Some people swear by it, so I'm curious what I am missing.

When I first started doing serious DB work (back in the PostgreSQL 7.x/MySQL 3.x days), there were some show-stopper flaws in MySQL that made it a non-starter for my scenario. (In particular, you couldn't self-join a table, and "February 31" was treated as a valid date.)

In performance terms, granted, pg was a bit of a dog in those days, but it outperformed MySQL in every benchmark I could throw at it, with minimal tuning. So, if you're experiencing it as less performant, you're most likely running with a default configuration — which is deliberately tuned for something like a 486-class box with 128MB RAM or so — and/or haven't ANALYZEd your data. (Those are complete WAGs, knowing nothing more than what you've said about your scenario, but they tend to be among the more common reasons for lackluster performance.)

As for support, as a complete noob, I had a weird performance problem I couldn't make sense of, so I went to the mailing lists. Within a few hours, I was exchanging stack traces and other sundry debugging/profiling dumps with Tom Lane. (He's in the Wikipedia. Even if you've never touched PostgreSQL, you use his code every day of your life.) I don't think you can get much better support than that. Since, I've never encountered a problem that I haven't been able to have addressed, or at least get pointed in the right direction, by asking on — or searching the archives of — the relevant mailing list.

From there, it was largely a matter of, "This is the one I already know how to use...", along with the better feature-set (not mentioned by any of the sibling posts thus far: transactional DDL); the lack of a known-evil corporate overlord who could pull the plug at any time; the consistent tens-of-percent performance improvements in every major release; a development community that will punt a feature to the next release if it's not 100% ready and provably correct; and, let's be honest, the fact that, as someone who's been doing pg work for as long as I have, I can command a very comfortable hourly rate on the basis of that depth of experience — particularly when it's been focused in high availability and replication.

(EDIT: proofreading.)

Re: Poll: What database does your company use?

#212
Almost all of the above. Because my company ships an appliance, we've got Postgres, Tokyo, Redis and several other semi-databases (Judy, Memcached, etc) on the appliances, and Postgres, Couch and HDFS/HBase on our side.

Much of the reason for the large number is for legacy code that is quickly being replaced. We're settling into Postgres, Redis and Couch.

Re: Poll: What database does your company use?

#213
post #204
post #149

Earlier quoted context omitted.

Ditto ( http://dropc.am ). Very write heavy load for us, which Riak handles without blinking. Fault tolerant, robust, and easy to administer. Every machine is identical, no special "master" nodes or anything like that.

I've heard this about Riak and I was quite excited to test it out for a new project, but in the limited testing I've done Cassandra and HBase both absolutely smoke Riak in terms of write performance. Not really apples to apples I suppose, but I was really surprised at how slow Riak was when handling many (millions) of small writes. We haven't finished our testing/profiling phase yet, so any hints on how to optimize a…

Without going too much into specifics and picking on individual databases (which I could do, boy do I have the scars...)

When you hit a certain traffic level, scalability, latency and robustness become far more important than single-node ops/s. I need to be able to add nodes and repair failed nodes while under load--I need the 99.9% latency mark to stay ~100ms while doing so. I don't really care how many bajillions of ops a second your database can do in some concocted scenario, b/c you're not going to do that many in the real world anyway (trust me, we tried). The disk subsystem is going to give you a few hundred, maybe a few thousand if you're lucky, IOPS, then your latency will spike to hell and your phone will wake you up at night.

Maybe in the world where 99% of ops are reads, you will put up impressive numbers, but now you're just showing you are pretty good at using the disk cache. That's a relatively easy problem.

The riak guys seem to get all this better than most: http://blog.basho.com/2011/05/11/Lies-Damn-Lies-And-NoSQL/

So, to give you a short answer to your direct question:

Use SLC SSDs + md + RAID-0. Have at least 5 nodes. Use bitcask, but realize that your keys will need to fit in memory. Also, realize that really small values aren't a great fit for Riak in some ways b/c the overhead per value is at least a few hundred bytes.

Also, it's important to note this is where I'm at right now, but maybe not where you (generally) are at. Riak may not make you happy at server #1, but it will make you pretty happy at server 10 and server 100.

Riak's sweet spot is people with scaling pains. If you only need a server or two to try some stuff, and you don't have any users yet, you might cause yourself more headaches than you need. Sometimes you don't need a locomotive, you need a motorcycle.

(These guys have a pretty great motorcycle: http://rethinkdb.com/ )

Re: Poll: What database does your company use?

#214
post #187
post #70

Riak! We're ( http://bu.mp ) using more Riak every day. So far so good.

I love Riak. It's become my go to for "this just has to work" (and I actually work on problems that need to scale, not ones I hope will have to scale). The only improvement you could make to it would be adding some of the fancier bits that make Redis really nice, like sets and lists.

Which datastore is it closer to? Mongo, Redis, Postgres? I haven't looked much into it, but I hear so many good things that maybe I should.

Re: Poll: What database does your company use?

#215
It might be more interesting to see what purposes the database is being used for. Are companies choosing different databases for embedding in saleable products, internal applications or saleable services? We use PostgreSQL for our product that we sell, but we use MySQL for in-house applications.

Re: Poll: What database does your company use?

#217
post #187

Earlier quoted context omitted.

I love Riak. It's become my go to for "this just has to work" (and I actually work on problems that need to scale, not ones I hope will have to scale). The only improvement you could make to it would be adding some of the fancier bits that make Redis really nice, like sets and lists.

Which datastore is it closer to? Mongo, Redis, Postgres? I haven't looked much into it, but I hear so many good things that maybe I should.

Cassandra. It's an eventually consistent, fully-distributed database, in the Dynamo mold: http://www.allthingsdistributed.com/files/amazon-dynamo-sosp...

Re: Poll: What database does your company use?

#218
post #217

Earlier quoted context omitted.

Which datastore is it closer to? Mongo, Redis, Postgres? I haven't looked much into it, but I hear so many good things that maybe I should.

Cassandra. It's an eventually consistent, fully-distributed database, in the Dynamo mold: http://www.allthingsdistributed.com/files/amazon-dynamo-sosp...

Thank you.

Re: Poll: What database does your company use?

#219
post #83

Earlier quoted context omitted.

For me JSON has replaced SQLLite, with a large reduction in code and complexity. [ Admittedly I've written my own routines to access it more simply/directly on iOS ]

Yeah and like HTML5 has totally replaced our web server.

I think you could make your point better by asking a question about the negative consequences/limitations of using JSON.

Sarcasm doesn't aid in making points online because people who don't know anything about the issue at hand make sarcastic 'points' as easily as an expert.

Post reply on HN