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
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
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
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