Busting myths about BigQuery
cloud.google.com
cloud.google.com
We use it as our infrastructure for big-data analysis and we get the results at the speed of light.
Every 60 seconds, there are nearly 1K queries that analyze users and IPs behavior.
Our entire ML is based on it, and there are half a dozen of applications in our platform that make use of BQ - from detecting scrapers, analyzing user input, defeating DDoS and more.
The built-in (with legacy sql variant [1]) Math and Window functions are super handy, the easy DataLab [2] integration, and the last but not least, Google DataStudio[3] that let us generate interactive reports in literally minutes are all making our choice (3+ years a great one).
BQ replaced 2,160,000 monthly cores (250 instances * 12 cores each always on) and petabytes of storage and cost us several grands per month.
This perhaps one of the greatest hidden gems available today in the cloud sphere and I recommend everyone to give it a try.
A very good friend of mine replaced MixPanel with BigQuery and saved nearly a quarter of a million dollars a year since [4].
--
[0] https://blog.reblaze.com/how-to-stop-a-ddos-attack-in-under-...
[1] https://cloud.google.com/bigquery/docs/reference/legacy-sql
[2] https://cloud.google.com/datalab/
[3] https://datastudio.google.com
[4] https://blog.doit-intl.com/replacing-mixpanel-with-bigquery-...
Here's the primary reason that is currently keeping me on Redshift:
Redshift is basically Postgres at the query layer which is insanely cool: All the Postgres tooling works with it. All the Postgres expertise I have carries over. It feels like a lot less of a "lock in".
Anyone care to chime in?
CockroachDB is the only other well-known project I know of that does this (but of course, it's not really an analytic database right now).
It is nice to be able to reuse existing tooling for redshift but we’re willing to make the trade for bigquery since the no-ops model is so much nicer. It’s basically magical how well it works.
Historically BigQuery data was immutable. You could delete a table, but you couldn't modify or delete a single row. That support was added recently, but there are daily limits imposed on those actions.
I'm a big fan of immutable data, up until you find that someone made a mistake somewhere. Naturally you can make modifications in ETL, but if you do that long enough your ETL job is a mess of time-based if statements.
We originally moved to also support Redshift because of BigQuery not supporting row level updates at that time. Someone on the content site would forget to put an & between URL params and our source data would be busted. Like I said, immutable data is great as long as you never make mistakes...
I'm also not a huge fan of nested records. If you use BigQuery, do yourself a favor and make sure you have a uuid field (it's a good practice any way). When you get data back from the client it can be a pain to piece records back together (nested records come back as single rows for the most part). This makes certain queries really fast, but it can be a pain to work with in aggregate.
My preferred setup these days is to dual write to Redshift and BigQuery. We run almost all analysis off of Redshift, but have a natural backup of data stored elsewhere. And like I said, BigQuery storage rates are dirt cheap. And if our Redshift cluster goes down for any reason, we can hop over to BigQuery to find what we need (and backfill any missing data points).
Redshift and BigQuery are both solid services. And BigQuery has gotten better with time. But I still have some reservations with it as a pure Redshift replacement.
The main app needs to know if a user has access to entitlement A, but the history of that process is outside the concern of the app itself.
We throw everything into BQ/Redshift. Then when we find a need for it, we bring it into a separate reporting dataset in Redshift via ETL.
The nice part about this is you can join your sanitized ETL data against raw event data if you need to run a once off query like "for everyone put into variant A of experiment B, how many converted from a free trial to a paid subscription?" I haven't found a great way to programmatically recreate ETL data into BQ without recreating a new dataset every day (because of the history of immutable data). It's not that it's impossible, it's just not as great (imho) as an upsert type workflow.
Occasionally we'll have a once off query we access by hand, but that's relatively rare at this point. Jobs run around 1am and everything is ready to go when the team gets in in the morning.
You have the odd job where you have to manage distkeys, and that's rarely fun, but it's a trade off we're comfortable making.
And, while I'm pimping other people's services, Redshift + Looker is incredible.
This is a bit hand wavy, but there is really no better way to get a feel for it than to try it. And think of it less as a db, and more as a map reduce cluster :) if that helps.
For example, if you're writing straight-up SQL, the fewer columns you project out before you start sorting the better off you are, it's better to join stuff after you've done your sort than the reverse because it means physically less data shuffling.
Also, you get immediate parallelisation across O(n) nodes. Again; not in redshift.
These are crucially different to regular DBs. They’re both semantically sql, nobody denies that, but they describe different underlying models.
E.g.: in BigQuery, you can’t sort your entire column, even if you do other stuff afterwards. That makes sense in a map reduce system, but not in a “normal” DB.
Analyzing AWS Detailed Billing Reports Using BigQuery and ReDash
https://blog.powerupcloud.com/analyzing-aws-detailed-billing...
If you're looking for a OLAP database running on your own infrastructure, make sure to give it a try.
- Multi-tenant architecture.
- Pay-per-job/query.
- Complete abstraction away of underlying resources.
- High availability out of the box.
- Automatic seamless scaling on-demand.
So services like BigQuery qualify, and Redshift don't.
(work at G)
What I think is different about BigQuery is just the on-demand parallelism. This means you pay per query instead of per instance which is confusing at first, but then a lot of the operational knobs simply go away (for better or for worse).
> F1 also provides a full-fledged SQL interface, which is used for low-latency OLTP queries, large OLAP queries, and everything in between.
> Ressi stores a database as an LSM tree, whose layers are periodically compacted. Within each layer, Ressi organizes data into blocks in row-major order, but lays out the data within a block in column-major order (essentially, the PAX layout).
[1] https://static.googleusercontent.com/media/research.google.c...
This is literally just Google putting out a press release touting one of their products. It isn't unbiased or doesn't attempt to be complete, but people here seem to think Google's opinion on their own technology is beyond reproach.
Think of something like this being on Microsoft or Oracle website. No way it would be voted up.
Conspiracy fodder: how smart (or not) would a team need to be to plan a "well-executed marketing play" for an enterprise database warehouse -- in the morning of freakin Saturday December 23rd?
http://images5.fanpop.com/image/photos/31100000/Classic-Patr...