FTA: "...I decided to migrate the existing system into a single table setup." "Alternative Proposed Solutions: MySQL Partitioning and Redis" I'm surprised he didn't consider at Mongo, Couch, etc.
My coworkers and I have absolutely zero experience with Mongo, Couch, etc. We do have experience with MySQL and Redis (see https://github.com/causes/mock_redis ), and I feel "safer" keeping important data in something as mature as MySQL.
Loading half a billion rows into MySQL
71–80 of 101 posts
Re: Loading half a billion rows into MySQL
#72Earlier quoted context omitted.
I'm more impressed with how cheap it is. An SSD is on par with a 15K disk, but delivers 10X the perf, throw 10 SSDs in an array and you've got what used to cost $100,000 for about $5K
But SSDs that cost the same as a 15K disk do not have anywhere near the life time of the spinning disk due to write endurance limits. So load half a billion rows but don't update it too often!
Re: Loading half a billion rows into MySQL
#73Re: Loading half a billion rows into MySQL
#74Does it blow anyone else's mind that database servers are so powerful nowadays that you can just load half a billion rows into a SINGLE TABLE and pretty much expect things to work? Obviously there are caveats but all in all a nice chunk of RAM backed by a large SSD goes a long way.
What's impressive now is not the software but that the hardware is so cheap.
Re: Loading half a billion rows into MySQL
#75If this data is primarily archival and there are multiple backups of the same dataset out there, why not use MyISAM? In my mind the only reasons to use InnoDB are integrity-related, things like real foreign keys and a more ACIDy commit method. If the dataset is read-only and copied in several places, surely this stuff does not matter too much and MyISAM is much more performant. Maybe I misread the use case?
I'm thinking if the server dies, MyISAM tables tend to corrupt more easily, and repairing a table that large will take a long time. But that's the only thing I can think of -- and the speed/size of MyISAM tables have a lot going for them, I'd be tempted to go with MyISAM. Anybody else?
* Any operation on myisam table locks it from writing
Re: Loading half a billion rows into MySQL
#76Earlier quoted context omitted.
My telemetry table is >2B rows and growing. 5B is starting to worry me; .5B, not so much. This is even backed by ( not much ) spinning rust.
Hopefully you don't have an auto-increment int (2^31) as a PK, or you'll be worrying sooner than you think.
Re: Loading half a billion rows into MySQL
#77It's more work for the computer to process data stored as "rows" than data stored as columns. Think of how a disk is organized. If you abandon MySQL and store data as columns you can load a trillion rows. But forget I mentioned this.
Re: Loading half a billion rows into MySQL
#78Earlier quoted context omitted.
I'm more impressed with how cheap it is. An SSD is on par with a 15K disk, but delivers 10X the perf, throw 10 SSDs in an array and you've got what used to cost $100,000 for about $5K
But SSDs that cost the same as a 15K disk do not have anywhere near the life time of the spinning disk due to write endurance limits. So load half a billion rows but don't update it too often!
Re: Loading half a billion rows into MySQL
#79I routinely load and reload ~7 billion rows into oracle 11g, once every 5 months or so. It takes about 4 days, 20 days if you do something stupid like create the indexes before loading, although I think oracle can go quite a bit faster, and that 4 days is limited by processing and non-DB I/O. We use oracle because the partitioning options are better and bitmapped indexes. (We wanted more partitions so we could use a…
Re: Loading half a billion rows into MySQL
#80Assuming your event data is immutable (i.e. no UPDATEs, just INSERTs), you'd probably have fewer headaches long-term if you just dumped the database to flatfiles, stored in HDFS and queried using Hive (which has MySQLish query syntax anyway). This architecture will take you to billions of rows quite happily. This is the architecture we use for eventstream analysis at SnowPlow ( https://github.com/snowplow/snowplow ).
At my company, we experimented with Hive and found it to be too slow. Once you decide that every row of data will be materialized into a java hash table instance, there are real performance limitations that follow from that representation. We decided to use HDFS and Hadoop but built our own query language called Trecul; it uses LLVM to jit compile dataflow code into native code. Picking off a single field to filter o…
While we're on the subject of high-performance alternatives to Hive for event analysis, we've been watching the development of Ben Johnson's behavioural db, called Sky, with interest: