How BigQuery broke my heart
Upcoming SlideShare
Loading in...5
×
 

How BigQuery broke my heart

on

  • 2,271 views

BigQuery is Google's columnar, massively parallel data querying solution. This talk explores using it as an ad-hoc reporting solution and the limitations present in May 2013.

BigQuery is Google's columnar, massively parallel data querying solution. This talk explores using it as an ad-hoc reporting solution and the limitations present in May 2013.

Statistics

Views

Total Views
2,271
Views on SlideShare
2,225
Embed Views
46

Actions

Likes
2
Downloads
21
Comments
2

3 Embeds 46

http://www.linkedin.com 39
https://twitter.com 5
https://www.linkedin.com 2

Accessibility

Categories

Upload Details

Uploaded via as Adobe PDF

Usage Rights

CC Attribution-ShareAlike LicenseCC Attribution-ShareAlike License

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
  • Patrick,
    I think I glanced at it but didn't know enough about it to put it on the short list of ones to evaluate. That's the funny thing about evaluating software, you never know what's lurking just outside of your search space.
    Are you sure you want to
    Your message goes here
    Processing…
  • Gabe,

    Curious as to why you didn't look at Vertica?
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

How BigQuery broke my heart How BigQuery broke my heart Presentation Transcript

  • howBigQuerybroke my heartGabe Hamilton
  • Reporting Solutions SmackdownWe are evaluating replacements for SQL Server for ourReporting & Business Intelligence backend.Many TBs of data.Closer to SQL the less report migration we need to do.We like saving money.
  • Solutions weve been testingRedshiftBigQueryCouchDBMongoDBCassandraTerraDataOracle
  • Plus various changes to our designSome of these are necessary for certain technologies.DenormalizationSharding strategiesNested dataTune our existing Star Schema and Tables
  • BigQuery isA massively parallel datastoreColumnarQueries are SQL Select statementsUses a Tree structure to distribute acrossnodes
  • How many nodes?10,000 nodes!
  • And what price?3.5 cents /GBResourcePricingQuery cost is per GB in the columns processedInteractive Queries $0.035Batch Queries $0.02Storage $0.12 (per GB/month)
  • Which is great for our big queriesA gnarly query that looks at 200GB of data costs $7.50 inBigQuery.If that takes 2 hours to run on a $60/hr cluster of acompeting technology...Its a little more complicated because in theory several ofthose queries could run simultaneously on the competingtech.Still, thats 4 X cheaper plus the speed improvement.
  • Example: Github data from past year3.5 GB TableSELECT type, count(*) as num FROM [publicdata:samples.github_timeline]group by type order by num desc;Query complete (1.1s elapsed, 75.0 MB processed)Event Type numPushEvent 2,686,723CreateEvent 964,830WatchEvent 581,029IssueCommentEvent 507,724GistEvent 366,643IssuesEvent 305,479ForkEvent 180,712PullRequestEvent 173,204FollowEvent 156,427GollumEvent 104,808Cost $0.0026or 5 for a penny
  • It was love at first type.
  • But Then...Reality
  • Uploaded our test datasetWhich is 250GBDocs are good, tools are good.Hurdle 1: only one join per query.Ok, rewrite as ugly nested selects...
  • Result
  • Round 2No problem, I had seen that joins weresomewhat experimental.Try the denormalized version of the data.SELECT ProductId, StoreId, ProductSizeId, InventoryDate,avg(InventoryQuantity) as InventoryQuantityFROM BigDataTest.denormGROUP EACH BY ProductId, StoreId, ProductSizeId, InventoryDate1st error message helpfully says, try GROUP EACH BY
  • Final Result
  • Its not you, its meThe documentation had some semi-useful information:Because the system is interactive, queries that produce a large number ofgroups might fail. The use of the TOP function instead of GROUP BY mightsolve the problem.However, the BigQuery TOP function only operates on one column.At this point I had jumped through enough hoops. I postedon Stack Overflow, the official support channel according tothe docs, and have gotten no response.
  • EpilogueSimplifying my query down to two groupingcolumns did cause it to run with a limitstatement.SELECT ProductId, StoreId,avg(InventoryQuantity) as InventoryQuantityFROM BigDataTest.denormGROUP each BY ProductId, StoreIdLimit 1000Query complete (4.5s elapsed, 28.1 GB processed)Without a limit it gives Error: Response too large to return.Perhaps there is still hope for me and BigQuery...
  • MeLike this talk?@gabehamiltonMy twitter feed is just technical stuff.or slideshare.net/gabehamilton