Earlier quoted context omitted.
Also the while; do; loop could probably be replaced with 'watch'.
I tried 'watch' first (love that lil' command), but for some reason it parses incorrectly and doesn't work.
Loading half a billion rows into MySQL
41–50 of 101 posts
Re: Loading half a billion rows into MySQL
#42"MySQL Partitioning. We decided against it because it seemed likely that it wouldn’t be much faster than our current solution." What if you partition by HASH(user_id) instead of partitioning by month ( http://dev.mysql.com/doc/refman/5.5/en/partitioning-hash.htm... )?
Re: Loading half a billion rows into MySQL
#43Assuming 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 ).
The code is open source (albeit with rough edges) at https://github.com/akamai-tech/trecul/
Re: Loading half a billion rows into MySQL
#44Assuming 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 ).
How big are the flatfiles that you're storing in HDFS? I've looked at it before for such a use, but for durability I want to write events in an isolate manner, which means lots and lots of small writes, either to single files or as a series of small files. I was under the impression that HDFS doesn't perform well in a use case like this (due to the size of it's write block size), but would LOVE if I could use it like…
Re: Loading half a billion rows into MySQL
#45"push as much complexity as possible to the database" In general, this is usually bad practice and difficult to scale. I do agree w/ using a single table, but I disagree with the general premise of that statement.
Re: Loading half a billion rows into MySQL
#46Re: Loading half a billion rows into MySQL
#47Re: Loading half a billion rows into MySQL
#48Re: Loading half a billion rows into MySQL
#49Re: Loading half a billion rows into MySQL
#50Earlier quoted context omitted.
I tried 'watch' first (love that lil' command), but for some reason it parses incorrectly and doesn't work.
While it is possible to beat that command with backslashes until it works, I often just give up and make it a shell script, on the grounds that usually by the time I have something that complicated I want to "watch" I ought to be checking it into source control, or at least have it on disk for the next time I want it. For database stuff like that I've had nearly a 100% hit rate of either reusing such things, or at le…
Though I'll admit to occasional traumatic moments when my workstation crashes and bash history is polluted with multiple shells filling it and the stuff I've been ctrl-R invoking (recursive reverse search) for months evaporates.