{"id":26452,"date":"2012-08-23T21:46:45","date_gmt":"2012-08-23T13:46:45","guid":{"rendered":"http:\/\/www.yankay.com\/?p=26452"},"modified":"2021-03-28T20:36:16","modified_gmt":"2021-03-28T12:36:16","slug":"google-dremel-rationale","status":"publish","type":"post","link":"http:\/\/yankay.com\/google-dremel-rationale\/","title":{"rendered":"Google Dremel \u539f\u7406 – \u5982\u4f55\u80fd3\u79d2\u5206\u67901PB"},"content":{"rendered":"
Dremel \u662fGoogle \u7684\u201c\u4ea4\u4e92\u5f0f\u201d\u6570\u636e\u5206\u6790\u7cfb\u7edf\u3002\u53ef\u4ee5\u7ec4\u5efa\u6210\u89c4\u6a21\u4e0a\u5343\u7684\u96c6\u7fa4\uff0c\u5904\u7406PB\u7ea7\u522b\u7684\u6570\u636e\u3002MapReduce\u5904\u7406\u4e00\u4e2a\u6570\u636e\uff0c\u9700\u8981\u5206\u949f\u7ea7\u7684\u65f6\u95f4\u3002\u4f5c\u4e3aMapReduce\u7684\u53d1\u8d77\u4eba\uff0cGoogle\u5f00\u53d1\u4e86Dremel\u5c06\u5904\u7406\u65f6\u95f4\u7f29\u77ed\u5230\u79d2\u7ea7\uff0c\u4f5c\u4e3aMapReduce\u7684\u6709\u529b\u8865\u5145\u3002Dremel\u4f5c\u4e3aGoogle BigQuery\u7684report\u5f15\u64ce\uff0c\u83b7\u5f97\u4e86\u5f88\u5927\u7684\u6210\u529f\u3002\u6700\u8fd1Apache\u8ba1\u5212\u63a8\u51faDremel\u7684\u5f00\u6e90\u5b9e\u73b0Drill\uff0c\u5c06Dremel\u7684\u6280\u672f\u53c8\u63a8\u5230\u4e86\u6d6a\u5c16\u4e0a\u3002<\/p>\n
\u6839\u636eGoogle\u516c\u5f00\u7684\u8bba\u6587\u300aDremel: Interactive Analysis of WebScaleDatasets<\/a>\u300b\u53ef\u4ee5\u770b\u5230Dremel\u7684\u8bbe\u8ba1\u539f\u7406\u3002\u8fd8\u6709\u4e00\u4e9b\u6d4b\u8bd5\u62a5\u544a\u3002\u8bba\u6587\u5199\u4e8e2006\u5e74\uff0c\u516c\u5f00\u4e8e2010\u5e74\uff0cGoogle\u5728\u5904\u7406\u5927\u6570\u636e\u65b9\u9762\uff0c\u679c\u771f\u6709\u5f97\u5929\u72ec\u539a\u7684\u4f18\u52bf\u3002\u4e0b\u9762\u7684\u5185\u5bb9\uff0c\u5f88\u5927\u90e8\u5206\u6765\u81ea\u8fd9\u7bc7\u8bba\u6587\u3002<\/p>\n \u968f\u7740Hadoop\u7684\u6d41\u884c\uff0c\u5927\u89c4\u6a21\u7684\u6570\u636e\u5206\u6790\u7cfb\u7edf\u5df2\u7ecf\u8d8a\u6765\u8d8a\u666e\u53ca\u3002\u6570\u636e\u5206\u6790\u5e08\u9700\u8981\u4e00\u4e2a\u80fd\u5c06\u6570\u636e\u201c\u73a9\u8f6c\u201d\u7684\u4ea4\u4e92\u5f0f\u7cfb\u7edf\u3002\u5982\u6b64\uff0c\u5c31\u53ef\u4ee5\u975e\u5e38\u65b9\u4fbf\u5feb\u6377\u7684\u6d4f\u89c8\u6570\u636e\uff0c\u5efa\u7acb\u5206\u6790\u6a21\u578b\u3002Dremel\u7cfb\u7edf\u6709\u4e0b\u9762\u51e0\u4e2a\u4e3b\u8981\u7684\u7279\u70b9\uff1a<\/p>\n \u8bbe\u60f3\u4e00\u4e2a\u4f7f\u7528\u573a\u666f\u3002\u6211\u4eec\u7684\u7f8e\u5973\u6570\u636e\u5206\u6790\u5e08\uff0c\u5979\u6709\u4e00\u4e2a\u65b0\u7684\u60f3\u6cd5\u8981\u9a8c\u8bc1\u3002\u8981\u9a8c\u8bc1\u5979\u7684\u60f3\u6cd5\uff0c\u9700\u8981\u5728\u4e00\u4e2a\u4e0a\u4ebf\u6761\u6570\u636e\u4e0a\u9762\uff0c\u8dd1\u4e00\u4e2a\u67e5\u8be2\uff0c\u770b\u770b\u7ed3\u679c\u548c\u5979\u7684\u60f3\u6cd5\u662f\u4e0d\u662f\u4e00\u6837\uff0c\u5979\u53ef\u4e0d\u5e0c\u671b\u7b49\u592a\u957f\u65f6\u95f4\uff0c\u6700\u597d\u51e0\u79d2\u949f\u7ed3\u679c\u5c31\u51fa\u6765\u3002\u5f53\u7136\u5979\u7684\u60f3\u6cd5\u4e0d\u4e00\u5b9a\u5b8c\u5584\uff0c\u8fd8\u9700\u8981\u4e0d\u65ad\u8c03\u6574\u8bed\u53e5\u3002\u7136\u540e\u5979\u9a8c\u8bc1\u4e86\u60f3\u6cd5\uff0c\u53d1\u73b0\u4e86\u6570\u636e\u4e2d\u7684\u4ef7\u503c\u3002\u6700\u540e\uff0c\u5979\u53ef\u4ee5\u5c06\u8fd9\u4e2a\u8bed\u53e5\u5b8c\u5584\u6210\u4e00\u4e2a\u957f\u671f\u8fd0\u884c\u7684\u4efb\u52a1\u3002<\/p>\n \u5bf9\u4e8eGoogle,\u6570\u636e\u4e00\u5f00\u59cb\u662f\u653e\u5728GFS\u4e0a\u7684\u3002\u53ef\u4ee5\u901a\u8fc7MapReduce\u5c06\u6570\u636e\u5bfc\u5165\u5230Dremel\u4e2d\u53bb\uff0c\u5728\u8fd9\u4e9bMapReduce\u4e2d\u8fd8\u53ef\u4ee5\u505a\u4e00\u4e9b\u5904\u7406\u3002\u7136\u540e\u5206\u6790\u5e08\u4f7f\u7528Dremel\uff0c\u8f7b\u677e\u6109\u60a6\u7684\u5206\u6790\u6570\u636e\uff0c\u5efa\u7acb\u6a21\u578b\u3002\u6700\u540e\u53ef\u4ee5\u7f16\u5236\u6210\u4e00\u4e2a\u957f\u671f\u8fd0\u884c\u7684MapReduce\u4efb\u52a1\u3002<\/p>\n \u8fd9\u79cd\u5904\u7406\u65b9\u5f0f\uff0c\u8ba9\u7b14\u8005\u8054\u60f3\u5230Greenplum\u7684Chorus<\/a>. Chorus\u4e5f\u53ef\u4ee5\u4e3a\u5206\u6790\u5e08\u63d0\u4f9b\u5feb\u901f\u7684\u6570\u636e\u67e5\u8be2\uff0c\u4e0d\u8fc7\u89e3\u51b3\u65b9\u6848\u662f\u901a\u8fc7\u9884\u5904\u7406\uff0c\u5bfc\u5165\u90e8\u5206\u6570\u636e\uff0c\u51cf\u5c11\u6570\u636e\u96c6\u7684\u5927\u5c0f\u3002\u7528\u7684\u662f\u4e09\u5341\u516d\u8ba1\uff0c\u8d70\u4e3a\u4e0a\u8ba1\uff0c\u907f\u5f00\u7684\u77ac\u65f6\u5206\u6790\u5927\u6570\u636e\u7684\u96be\u9898\u3002Chorus\u6700\u8fd1\u5373\u5c06\u5f00\u6e90\uff0c\u53ef\u4ee5\u5173\u6ce8\u4e0b\u3002<\/p>\n \u8fd8\u6709\u4e00\u70b9\u7279\u522b\u7684\u5c31\u662f\u6309\u5217\u5b58\u50a8\u7684\u5d4c\u5957\u6570\u636e\u683c\u5f0f\u3002\u5982\u56fe\u6240\u793a\uff0c\u5728\u6309\u8bb0\u5f55\u5b58\u50a8\u7684\u6a21\u5f0f\u4e2d\uff0c\u4e00\u4e2a\u8bb0\u5f55\u7684\u591a\u5217\u662f\u8fde\u7eed\u7684\u5199\u5728\u4e00\u8d77\u7684\u3002\u5728\u6309\u5217\u5b58\u50a8\u4e2d\uff0c\u53ef\u4ee5\u5c06\u6570\u636e\u6309\u5217\u5206\u5f00\u3002\u4e5f\u5c31\u662f\u8bf4\uff0c\u53ef\u4ee5\u4ec5\u4ec5\u626b\u63cfA.B.C\u800c\u4e0d\u53bb\u8bfbA.E\u6216\u8005A.B.C\u3002\u96be\u70b9\u5728\u4e8e\uff0c\u6211\u4eec\u5982\u4f55\u80fd\u540c\u65f6\u9ad8\u6548\u5730\u626b\u63cf\u82e5\u5e72\u5217\uff0c\u5e76\u505a\u4e00\u4e9b\u5206\u6790\u3002<\/p>\n <\/p>\n \u5728Google, \u7528Protocol Buffer\u5e38\u5e38\u4f5c\u4e3a\u5e8f\u5217\u5316\u7684\u65b9\u6848\u3002\u5176\u6570\u636e\u6a21\u578b\u53ef\u4ee5\u7528\u6570\u5b66\u65b9\u6cd5\u4e25\u683c\u7684\u8868\u793a\u5982\u4e0b\uff1a<\/p>\n $$!t=dom |<a_1:t[*|?],…,a_n:t[*|?]>$$<\/a_1:t[*|?],…,a_n:t[*|?]><\/p>\n \u5176\u4e2dt\u53ef\u4ee5\u662f\u4e00\u4e2a\u57fa\u672c\u7c7b\u578b\u6216\u8005\u7ec4\u5408\u7c7b\u578b\u3002\u5176\u4e2d\u57fa\u672c\u7c7b\u578b\u53ef\u4ee5\u662finteger,float\u548cstring\u3002\u7ec4\u5408\u7c7b\u578b\u53ef\u4ee5\u662f\u82e5\u5e72\u4e2a\u57fa\u672c\u7c7b\u578b\u62fc\u51d1\u3002\u661f\u53f7(*)\u6307\u7684\u662f\u4efb\u4f55\u7c7b\u578b\u90fd\u53ef\u4ee5\u91cd\u590d\uff0c\u5c31\u662f\u6570\u7ec4\u4e00\u6837\u3002\u95ee\u53f7(?)\u6307\u7684\u662f\u4efb\u610f\u7c7b\u578b\u90fd\u662f\u53ef\u4ee5\u662f\u53ef\u9009\u7684\u3002\u7b80\u5355\u6765\u8bf4\uff0c\u9664\u4e86\u6ca1\u6709Map\u5916\uff0c\u548c\u4e00\u4e2aJson\u51e0\u4e4e\u6ca1\u6709\u533a\u522b\u3002<\/p>\n \u4e0b\u56fe\u662f\u4f8b\u5b50\uff0cSchema\u5b9a\u4e49\u4e86\u4e00\u4e2a\u7ec4\u5408\u7c7b\u578bDocument.\u6709\u4e00\u4e2a\u5fc5\u9009\u5217DocId\uff0c\u53ef\u9009\u5217Links\uff0c\u8fd8\u6709\u4e00\u4e2a\u6570\u7ec4\u5217Name\u3002\u53ef\u4ee5\u7528Name.Language.Code\u6765\u8868\u793aCode\u5217\u3002<\/p>\n <\/p>\n \u8fd9\u79cd\u6570\u636e\u683c\u5f0f\u662f\u8bed\u8a00\u65e0\u5173\uff0c\u5e73\u53f0\u65e0\u5173\u7684\u3002\u53ef\u4ee5\u4f7f\u7528Java\u6765\u5199MR\u7a0b\u5e8f\u6765\u751f\u6210\u8fd9\u4e2a\u683c\u5f0f\uff0c\u7136\u540e\u7528C++\u6765\u8bfb\u53d6\u3002\u5728\u8fd9\u79cd\u5217\u5f0f\u5b58\u50a8\u4e2d\uff0c\u80fd\u591f\u5feb\u901f\u901a\u7528\u5904\u7406\u4e5f\u662f\u975e\u5e38\u7684\u91cd\u8981\u7684\u3002<\/p>\n \u4e0a\u56fe\uff0c\u662f\u4e00\u4e2a\u793a\u4f8b\u6570\u636e\u7684\u62bd\u8c61\u7684\u6a21\u578b\uff1b\u4e0b\u56fe\u662f\u8fd9\u4efd\u6570\u636e\u5728Dremel\u5b9e\u9645\u7684\u5b58\u50a8\u7684\u683c\u5f0f\u3002<\/p>\n <\/p>\n \u5982\u679c\u662f\u5173\u7cfb\u578b\u6570\u636e\uff0c\u800c\u4e0d\u662f\u5d4c\u5957\u7684\u7ed3\u6784\u3002\u5b58\u50a8\u7684\u65f6\u5019\uff0c\u6211\u4eec\u53ef\u4ee5\u5c06\u6bcf\u4e00\u5217\u7684\u503c\u76f4\u63a5\u6392\u5217\u4e0b\u6765\uff0c\u4e0d\u7528\u5f15\u5165\u5176\u4ed6\u7684\u6982\u5ff5\uff0c\u4e5f\u4e0d\u4f1a\u4e22\u5931\u6570\u636e\u3002\u5bf9\u4e8e\u5d4c\u5957\u7684\u7ed3\u6784\uff0c\u6211\u4eec\u8fd8\u9700\u8981\u4e24\u4e2a\u53d8\u91cfR (Repetition Level) ,D (Definition Level) \u624d\u80fd\u5b58\u50a8\u5176\u5b8c\u6574\u7684\u4fe1\u606f\u3002<\/p>\n Repetition Level<\/strong>\u662f\u8bb0\u5f55\u8be5\u5217\u7684\u503c\u662f\u5728\u54ea\u4e00\u4e2a\u7ea7\u522b\u4e0a\u91cd\u590d\u7684\u3002\u4e3e\u4e2a\u4f8b\u5b50\u8bf4\u660e\uff1a\u5bf9\u4e8eName.Language.Code? \u6211\u4eec\u4e00\u5171\u6709\u4e09\u6761\u975eNull\u7684\u8bb0\u5f55\u3002<\/p>\n \u6211\u4eec\u53ef\u4ee5\u60f3\u8c61\uff0c\u5c06\u6240\u6709\u7684\u6ca1\u6709\u503c\u7684\u5217\uff0c\u8bbe\u503c\u4e3aNULL\u3002\u5982\u679c\u662f\u6570\u7ec4\u5217\uff0c\u6211\u4eec\u4e5f\u60f3\u8c61\u6709\u4e00\u4e2aNULL\u503c\u3002\u6709\u4e86Repetition Level\uff0c\u6211\u4eec\u5c31\u53ef\u4ee5\u5f88\u597d\u7684\u7528\u5217\u8868\u793a\u5d4c\u5957\u7684\u7ed3\u6784\u4e86\u3002\u4f46\u662f\u8fd8\u6709\u4e00\u70b9\u4e0d\u8db3\u3002\u5c31\u662f\u8fd8\u9700\u8981\u8868\u793a\u4e00\u4e2a\u6570\u7ec4\u662f\u4e0d\u662f\u6211\u4eec\u60f3\u8c61\u51fa\u6765\u7684\u3002<\/p>\n Definition Level<\/strong> \u662f\u5b9a\u4e49\u7684\u6df1\u5ea6\uff0c\u7528\u6765\u8bb0\u5f55\u8be5\u5217\u662f\u5426\u662f\u201d\u60f3\u8c61\u201d\u51fa\u6765\u7684\u3002\u6240\u4ee5\u5bf9\u4e8e\u975eNULL\u7684\u8bb0\u5f55\uff0c\u662f\u6ca1\u6709\u610f\u4e49\u7684\uff0c\u5176\u503c\u5fc5\u7136\u4e3a\u76f8\u540c\u3002\u540c\u6837\u4e3e\u4e2a\u4f8b\u5b50\u3002\u4f8b\u5982Name.Language.Country,<\/p>\n \u5c31\u662f\u8fd9\u6837\uff0c\u5982\u679c\u8def\u5f84\u4e2d\u6709required\uff0c\u53ef\u4ee5\u5c06\u5176\u51cf\u53bb\uff0c\u56e0\u4e3arequired\u5fc5\u7136\u4f1adefine\uff0c\u8bb0\u5f55\u5176\u6570\u91cf\u6ca1\u6709\u610f\u4e49\u3002<\/p>\n \u7406\u89e3\u4e86\u5982\u4f55\u5b58\u50a8\u8fd9\u79cd\u5d4c\u5957\u7ed3\u6784\u3002\u5199\u6ca1\u6709\u96be\u5ea6\u3002\u8bfb\u7684\u65f6\u5019\uff0c\u6211\u4eec\u53ea\u8bfb\u5176\u4e2d\u90e8\u5206\u5b57\u6bb5\uff0c\u6765\u6784\u5efa\u90e8\u5206\u7684\u6570\u636e\u6a21\u578b\u3002\u4f8b\u5982\uff0c\u53ea\u8bfb\u53d6DocID\u548cName.Language.Country\u3002\u6211\u4eec\u53ef\u4ee5\u540c\u65f6\u626b\u63cf\u4e24\u4e2a\u5b57\u6bb5\uff0c\u5148\u626b\u63cfDocID\u3002\u8bb0\u5f55\u4e0b\u7b2c\u4e00\u4e2a\uff0c\u7136\u540e\u53d1\u73b0\u4e0b\u4e00\u4e2aDocID\u7684R\u662f0\uff1b\u4e8e\u662f\u8be5\u8bfbName.Language.Country\uff0c\u5982\u679c\u4e0b\u4e00\u4e2aR\u662f1\u6216\u80052\u5c31\u7ee7\u7eed\u8bfb\uff0c\u5982\u679c\u662f0\u5c31\u5f00\u59cb\u8bfb\u4e0b\u4e00\u4e2aDocID\u3002<\/p>\n <\/p>\n \u4e0b\u56fe\u5c55\u793a\u4e86\u4e00\u4e2a\u66f4\u4e3a\u590d\u6742\u7684\u8bfb\u53d6\u7684\u72b6\u6001\u673a\u793a\u4f8b\u3002\u5728\u8bfb\u53d6\u8fc7\u7a0b\u4e2d\u4f7f\u7528\u4e86Definition Level\u6765\u5feb\u901fJump,\u63d0\u5347\u6027\u80fd\u3002<\/p>\n <\/p>\n \u5230\u6b64\u4e3a\u6b62\uff0c\u6211\u4eec\u5df2\u7ecf\u77e5\u9053\u4e86Dremel\u7684\u6570\u636e\u7ed3\u6784\u3002\u5c31\u50cf\u5176\u4ed6\u6570\u636e\u5206\u6790\u7cfb\u7edf\u4e00\u6837\uff0c\u6570\u636e\u7ed3\u6784\u786e\u5b9a\u4e0b\u6765\uff0c\u529f\u80fd\u5c31\u51b3\u5b9a\u4e86\u4e00\u5927\u534a\u3002\u5bf9\u4e8eDremel\u7684\u6570\u636e\u67e5\u8be2\uff0c\u5fc5\u7136\u662f\u201c\u5168\u8868\u626b\u63cf\u201d\uff0c\u4f46\u7531\u4e8e\u5176\u5de7\u5999\u7684\u5217\u5b58\u50a8\u8bbe\u8ba1\uff0c\u826f\u597d\u7684\u6570\u636e\u6a21\u578b\u8bbe\u8ba1\u53ef\u4ee5\u56de\u907f\u6389\u5927\u90e8\u5206Join\u9700\u6c42\u548c\u626b\u63cf\u6700\u5c11\u7684\u5217\u3002<\/p>\n Dremel\u53ef\u4ee5\u4f7f\u7528\u4e00\u79cdSQL-like\u7684\u8bed\u6cd5\u67e5\u8be2\u5d4c\u5957\u6570\u636e\u3002\u7531\u4e8eDremel\u7684\u6570\u636e\u662f\u53ea\u8bfb\u7684\uff0c\u5e76\u4e14\u4f1a\u5bc6\u96c6\u7684\u53d1\u8d77\u591a\u6b21\u7c7b\u4f3c\u7684\u8bf7\u6c42\u3002\u6240\u4ee5\u53ef\u4ee5\u4fdd\u7559\u4e0a\u6b21\u8bf7\u6c42\u7684\u4fe1\u606f\uff0c\u8fd8\u4f18\u5316\u4e0b\u6b21\u8bf7\u6c42\u7684explain\u8fc7\u7a0b\u3002\u90a3\u53c8\u662f\u5982\u4f55explain\u7684\u5462\uff1f<\/p>\n <\/p>\n \u8fd9\u662f\u4e00\u4e2a\u6811\u72b6\u67b6\u6784\u3002\u5f53Client\u53d1\u5176\u4e00\u4e2a\u8bf7\u6c42\uff0c\u6839\u8282\u70b9\u53d7\u5230\u8bf7\u6c42\uff0c\u6839\u636emetadata\uff0c\u5c06\u5176\u5206\u89e3\u5230\u679d\u53f6\uff0c\u76f4\u5230\u5230\u4f4d\u4e8e\u6570\u636e\u4e0a\u9762\u7684\u53f6\u5b50Server\u3002\u4ed6\u4eec\u626b\u63cf\u5904\u7406\u6570\u636e\uff0c\u53c8\u4e0d\u65ad\u6c47\u603b\u5230\u6839\u8282\u70b9\u3002<\/p>\n \u4e3e\u4e2a\u4f8b\u5b50\uff1a\u5bf9\u4e8e\u8bf7\u6c42\uff1a<\/p>\n \u6839\u8282\u70b9\u6536\u5230\u8bf7\u6c42\uff0c\u4f1a\u6839\u636e\u6570\u636e\u7684\u5206\u533a\u8bf7\u6c42\uff0c\u5c06\u8bf7\u6c42\u53d8\u6210\u53ef\u4ee5\u62c6\u5206\u7684\u6837\u5b50\u3002\u539f\u6765\u7684\u8bf7\u6c42\u4f1a\u53d8\u4e3a\u3002<\/p>\n R1,\u2026RN\u662fT\u7684\u5206\u533a\u8ba1\u7b97\u51fa\u7684\u7ed3\u679c\u96c6\u3002\u8d8a\u5927\u7684\u8868\u6709\u8d8a\u591a\u7684\u5206\u533a\uff0c\u8d8a\u591a\u7684\u5206\u533a\u53ef\u4ee5\u8d8a\u597d\u7684\u652f\u6301\u5e76\u53d1\u3002<\/p>\n \u7136\u540e\u518d\u5c06\u8bf7\u6c42\u5207\u5206\uff0c\u53d1\u9001\u5230\u6bcf\u4e2a\u5206\u533a\u7684\u53f6\u5b50Server\u4e0a\u9762\u53bb,\u5bf9\u4e8e\u6bcf\u4e2aServer<\/p>\n \u7ed3\u6784\u96c6\u4e00\u5b9a\u4f1a\u6bd4\u539f\u59cb\u6570\u636e\u5c0f\u5f88\u591a\uff0c\u5904\u7406\u8d77\u6765\u4e5f\u66f4\u5feb\u3002\u6839\u670d\u52a1\u5668\u53ef\u4ee5\u5f88\u5feb\u7684\u5c06\u6570\u636e\u6c47\u603b\u3002\u5177\u4f53\u7684\u805a\u5408\u65b9\u5f0f\uff0c\u53ef\u4ee5\u4f7f\u7528\u73b0\u6709\u7684\u5e76\u884c\u6570\u636e\u5e93\u6280\u672f\u3002<\/p>\n Dremel\u662f\u4e00\u4e2a\u591a\u7528\u6237\u7684\u7cfb\u7edf\u3002\u5207\u5272\u5206\u914d\u4efb\u52a1\u7684\u65f6\u5019\uff0c\u8fd8\u9700\u8981\u8003\u8651\u7528\u6237\u4f18\u5148\u7ea7\u548c\u8d1f\u8f7d\u5747\u8861\u3002\u5bf9\u4e8e\u5927\u578b\u7cfb\u7edf\uff0c\u8fd8\u9700\u8981\u8003\u8651\u5bb9\u9519\uff0c\u5982\u679c\u4e00\u4e2a\u53f6\u5b50Server\u51fa\u73b0\u6545\u969c\u6216\u53d8\u6162\uff0c\u4e0d\u80fd\u8ba9\u6574\u4e2a\u67e5\u8be2\u4e5f\u53d7\u5230\u660e\u663e\u5f71\u54cd\u3002<\/p>\n \u901a\u5e38\u60c5\u51b5\u4e0b\uff0c\u6bcf\u4e2a\u8ba1\u7b97\u8282\u70b9\uff0c\u6267\u884c\u591a\u4e2a\u4efb\u52a1\u3002\u4f8b\u5982\uff0c\u6280\u5de7\u4e2d\u67093000\u4e2a\u53f6\u5b50Server\uff0c\u6bcf\u4e2aServer\u4f7f\u75288\u4e2a\u7ebf\u7a0b\uff0c\u6709\u53ef\u4ee5\u670924000\u4e2a\u8ba1\u7b97\u5355\u5143\u3002\u5982\u679c\u4e00\u5f20\u8868\u53ef\u4ee5\u5212\u5206\u4e3a100000\u4e2a\u533a\uff0c\u5c31\u610f\u5473\u7740\u5927\u7ea6\u6bcf\u4e2a\u8ba1\u7b97\u5355\u5143\u9700\u8981\u8ba1\u7b975\u4e2a\u533a\u3002\u8fd9\u6267\u884c\u7684\u8fc7\u7a0b\u4e2d\uff0c\u5982\u679c\u67d0\u4e00\u4e2a\u8ba1\u7b97\u5355\u5143\u592a\u5fd9\uff0c\u5c31\u4f1a\u53e6\u5916\u542f\u4e00\u4e2a\u6765\u8ba1\u7b97\u3002\u8fd9\u4e2a\u8fc7\u7a0b\u662f\u52a8\u6001\u5206\u914d\u7684\u3002<\/p>\n \u5bf9\u4e8eGFS\u8fd9\u6837\u7684\u5b58\u50a8\uff0c\u4e00\u4efd\u6570\u636e\u4e00\u822c\u67093\u4efd\u62f7\u8d1d\uff0c\u8ba1\u7b97\u5355\u5143\u5f88\u5bb9\u6613\u5c31\u80fd\u5206\u914d\u5230\u6570\u636e\u6240\u5728\u7684\u8282\u70b9\u4e0a\uff0c\u5178\u578b\u7684\u60c5\u51b5\u53ef\u4ee5\u5230\u8fbe95%\u7684\u547d\u4e2d\u7387\u3002<\/p>\n Dremel\u8fd8\u6709\u4e00\u4e2a\u914d\u7f6e\uff0c\u5c31\u662f\u5728\u6267\u884c\u67e5\u8be2\u7684\u65f6\u5019\uff0c\u53ef\u4ee5\u6307\u5b9a\u626b\u63cf\u90e8\u5206\u5206\u533a\uff0c\u6bd4\u5982\u53ef\u4ee5\u626b\u63cf30%\u7684\u5206\u533a\uff0c\u5728\u4f7f\u7528\u7684\u65f6\u5019\uff0c\u76f8\u5f53\u4e8e\u968f\u673a\u62bd\u6837\uff0c\u52a0\u5feb\u67e5\u8be2\u3002<\/p>\n \u5b9e\u9a8c\u7684\u6570\u636e\u6e90\u5982\u4e0b\u8868\u793a\u3002\u5927\u90e8\u5206\u6570\u636e\u590d\u5236\u4e863\u6b21\uff0c\u4e5f\u6709\u4e00\u4e2a\u4e24\u6b21\u3002\u6bcf\u4e2a\u8868\u4f1a\u6709\u82e5\u5e72\u5206\u533a\uff0c\u6bcf\u4e2a\u5206\u533a\u7684\u5927\u5c0f\u5728100K\u5230800K\u4e4b\u95f4\u3002\u5982\u679c\u538b\u7f29\u7387\u662f25%\uff0c\u5e76\u4e14\u8ba1\u5165\u590d\u52363\u4efd\u7684\u4e8b\u5b9e\u7684\u8bdd\u3002T1\u7684\u5927\u5c0f\u5df2\u7ecf\u8fbe\u5230PB\u7ea7\u522b\u3002\u8fd9\u4e48\u5c0f\u4e14\u5de8\u91cf\u7684\u5206\u533a\uff0c\u5bf9\u4e8eGFS\u7684\u8981\u6c42\u5f88\u9ad8\uff0c\u73b0\u5728\u7684Hdfs\u7a33\u5b9a\u7248\u6050\u6015\u53d7\u4e0d\u4e86\u3002\u63a5\u4e0b\u6765\u7684\u6d4b\u8bd5\u4f1a\u9010\u6b65\u63ed\u793a\u5176\u662f\u5982\u4f55\u8d85\u8fc7MR\uff0c\u5e76\u5bf9\u6027\u80fd\u4f5c\u51fa\u5206\u6790\u3002<\/p>\n \u9996\u5148\uff0c\u6211\u4eec\u6d4b\u8bd5\u770b\u770b\u5217\u5b58\u7684\u6548\u679c\u3002\u5bf9\u4e8eT1\u8868\uff0c1GB\u7684\u6570\u636e\u5927\u7ea6\u6709300K\u884c\uff0c\u4f7f\u7528\u5217\u5b58\u7684\u8bdd\u538b\u7f29\u540e\u5927\u7ea6\u5728375MB\u3002\u8fd9\u53f0\u673a\u5668\u78c1\u76d8\u7684\u541e\u5410\u572870MB\/s\u5de6\u53f3\u3002\u8fd91GB\u7684\u6570\u636e\uff0c\u5c31\u662f\u6211\u4eec\u7684\u73b0\u5728\u7684\u6d4b\u8bd5\u6570\u636e\u6e90\uff0c\u6d4b\u8bd5\u73af\u5883\u662f\u5355\u673a\u3002<\/p>\n <\/p>\n \u89c1\u4e0a\u56fe\u3002<\/p>\n \u4ece\u56fe\u4e0a\u53ef\u4ee5\u770b\u51fa\u3002\u5982\u679c\u9700\u8981\u8bfb\u7684\u5217\u5f88\u5c11\u7684\u8bdd\uff0c\u5217\u5b58\u7684\u4f18\u52bf\u5c31\u4f1a\u7279\u522b\u7684\u660e\u663e\u3002\u5bf9\u4e8e\u5217\u7684\u589e\u52a0\uff0c\u4ea7\u751f\u7684\u8017\u65f6\u4e5f\u51e0\u4e4e\u662f\u7ebf\u6027\u7684\u3002\u800c\u4e00\u6761\u4e00\u6761\u8be5\u4e2a\u8bfb\u548c\u53cd\u5e8f\u5217\u5316\u7684\u5f00\u9500\u662f\u5f88\u5927\u7684\uff0c\u51e0\u4e4e\u90fd\u5728\u539f\u6765\u57fa\u7840\u4e0a\u589e\u52a0\u4e86\u4e00\u500d\u3002\u800c\u6309\u884c\u8bfb\uff0c\u5217\u6570\u7684\u589e\u52a0\u6ca1\u6709\u5f71\u54cd\uff0c\u56e0\u4e3a\u4e00\u6b21\u6027\u8bfb\u4e86\u5168\u90e8\u5217\u3002<\/p>\n MR\u548cDremel\u6700\u5927\u7684\u533a\u522b\u5728\u4e8e\u884c\u5b58\u548c\u5217\u5b58\u3002\u5982\u679c\u4e0d\u80fd\u51fb\u8d25MapReduce\uff0cRemel\u5c31\u6ca1\u6709\u610f\u4e49\u4e86\u3002\u4f7f\u7528\u6700\u5e38\u89c1\u7684WordCount\u6d4b\u8bd5\uff0c\u8ba1\u7b97\u8fd9\u4e2a\u6570\u636e\u4e2dWord\u7684\u4e2a\u6570\u3002<\/p>\n <\/p>\n \u4e0a\u56fe\u662f\u6d4b\u8bd5\u7684\u7ed3\u679c\u3002\u4f7f\u7528\u4e86\u4e24\u4e2aMR\u4efb\u52a1\u3002\u8fd9\u4e24\u4e2a\u4efb\u52a1\u548cDremel\u4e00\u6837\u90fd\u8fd0\u884c\u57283000\u4e2a\u8282\u70b9\u4e0a\u9762\u3002\u5982\u679c\u4f7f\u7528\u5217\u5b58\uff0cDremel\u7684\u6309\u5217\u8bfb\u7684MR\u53ea\u9700\u8981\u8bfb0.5TB\u7684\u6570\u636e\uff0c\u800c\u6309\u884c\u5b58\u9700\u8981\u8bfb87TB\u3002 MR\u63d0\u4f9b\u4e86\u4e00\u4e2a\u65b9\u4fbf\u6709\u6548\u7684\u9014\u7ecf\u6765\u8bb2\u6309\u884c\u6570\u636e\u8f6c\u6362\u6210\u6309\u5217\u7684\u6570\u636e\u3002Dremel\u53ef\u4ee5\u65b9\u4fbf\u7684\u5bfc\u5165MapReduce\u7684\u5904\u7406\u7ed3\u679c\u3002<\/p>\n \u63a5\u4e0b\u6765\u6211\u4eec\u8981\u5bf9\u6bd4\u5728T2\u8868\u793a\u4f7f\u7528\u4e24\u4e2a\u4e0d\u540c\u7684Group BY\u67e5\u8be2\u3002T2\u8868\u670924 billion \u884c\u7684\u8bb0\u5f55\u3002\u6bcf\u4e2a\u8bb0\u5f55\u6709\u4e00\u4e2a item\u5217\u8868\uff0c\u6bcf\u4e00item\u6709\u4e00\u4e2aamount \u5b57\u6bb5\u3002\u603b\u5171\u670940 billion\u4e2aitem.amount\u3002\u8fd9\u4e24\u4e2aQuery\u5206\u522b\u662f\u3002<\/p>\n Q2\u9700\u8981\u626b\u63cf60GB\u7684\u538b\u7f29\u6570\u636e\uff0cQ3\u9700\u8981\u626b\u63cf180GB\uff0c\u540c\u65f6\u8fd8\u8981\u8fc7\u6ee4\u4e00\u4e2a\u6761\u4ef6\u3002<\/p>\n <\/p>\n \u4e0a\u56fe\u662f\u8fd9\u4e24\u4e2aQuery\u5728\u4e0d\u540c\u7684server\u62d3\u6251\u4e0b\u7684\u6027\u80fd\u3002\u6bcf\u4e2a\u6d4b\u8bd5\u90fd\u662f\u67092900\u4e2a\u53f6\u5b50Server\u3002\u57282\u7ea7\u62d3\u6251\u4e2d\uff0c\u6839server\u76f4\u63a5\u548c\u53f6\u5b50Server\u901a\u4fe1\u3002\u57283\u7ea7\u62d3\u6251\u4e2d\uff0c\u5404\u4e2a\u7ea7\u522b\u7684\u6bd4\u4f8b\u662f1:100:2900\uff0c\u589e\u52a0\u4e86100\u4e2a\u4e2d\u95f4Server\u3002\u57284\u7ea7\u62d3\u6251\u4e2d\uff0c\u6bd4\u4f8b\u4e3a1:10:100:2900.<\/p>\n Q2\u53ef\u4ee5\u57283\u7ea7\u62d3\u6251\u4e0b3\u79d2\u5185\u6267\u884c\u5b8c\u6bd5\uff0c\u4f46\u662f\u4e3a\u4ed6\u63d0\u4f9b\u66f4\u9ad8\u7684\u62d3\u6251\u7ea7\u522b\uff0c\u5bf9\u6027\u80fd\u63d0\u5347\u6ca1\u6709\u88e8\u76ca\u3002\u76f8\u6bd4\u4e4b\u4e0b\uff0c\u4e3aQ3\u63d0\u4f9b\u66f4\u9ad8\u7684\u62d3\u6251\u7ea7\u522b\uff0c\u6027\u80fd\u53ef\u4ee5\u6709\u6548\u63d0\u5347\u3002\u8fd9\u4e2a\u6d4b\u8bd5\u4f53\u73b0\u4e86\u6811\u72b6\u62d3\u6251\u5bf9\u6027\u80fd\u63d0\u5347\u7684\u4f5c\u7528\u3002<\/p>\n \u5bf9\u4e8e\u521a\u521a\u7684\u4e24\u4e2a\u67e5\u8be2\uff0c\u5177\u4f53\u7684\u6bcf\u4e2a\u5206\u533a\u7684\u6267\u884c\u60c5\u51b5\u662f\u8fd9\u6837\u7684\u3002<\/p>\n <\/p>\n \u53ef\u4ee5\u770b\u523099%\u7684\u5206\u533a\u90fd\u57281s\u5185\u5b8c\u6210\u4e86\u3002Dremel\u4f1a\u81ea\u52a8\u8c03\u5ea6\uff0c\u4f7f\u7528\u65b0\u7684Server\u8ba1\u7b97\u62d6\u540e\u817f\u7684\u4efb\u52a1\u3002<\/p>\n \u7531\u4e8eDemel\u652f\u6301List\u7684\u6570\u636e\u7c7b\u578b\uff0c\u6709\u7684\u65f6\u5019\uff0c\u6211\u4eec\u9700\u8981\u8ba1\u7b97\u6bcf\u4e2a\u8bb0\u5f55\u91cc\u9762\u7684\u5404\u4e2aList\u7684\u805a\u5408\u3002\u5982<\/p>\n \u6211\u4eec\u9700\u8981count\u6240\u6709sum(a.b.c.d)\u6bd4sum(a.b.p.q.r)\uff0c\u6267\u884c\u8fd9\u6761\u8bed\u53e5\u5b9e\u9645\u53ea\u9700\u8981\u626b\u63cf13GB\u7684\u6570\u636e\uff0c\u8017\u65f615s\uff0c\u800c\u6574\u5f20\u8868\u670970TB\u3002\u5982\u679c\u6ca1\u6709\u8fd9\u6837\u7684\u5d4c\u5957\u6570\u636e\u7ed3\u6784\uff0c\u8fd9\u6837\u7684\u67e5\u8be2\u4f1a\u5f88\u590d\u6742\u3002<\/p>\n Dremel\u6709\u826f\u597d\u7684\u6269\u5c55\u6027\uff0c\u53ef\u4ee5\u901a\u8fc7\u589e\u52a0\u673a\u5668\u6765\u7f29\u77ed\u67e5\u8be2\u7684\u65f6\u95f4\u3002\u5e76\u4e14\u53ef\u4ee5\u5904\u7406\u6570\u4ee5\u4e07\u4ebf\u8ba1\u7684\u8bb0\u5f55\u3002<\/p>\n \u5bf9\u4e8e\u67e5\u8be2\uff1a<\/p>\n \u4f7f\u7528\u4e0d\u540c\u7684\u53f6\u5b50Server\u6570\u76ee\u6765\u8fdb\u884c\u6d4b\u8bd5\u3002<\/p>\n <\/p>\n \u53ef\u4ee5\u53d1\u73b0CPU\u7684\u8017\u65f6\u603b\u6570\u662f\u57fa\u672c\u4e0d\u53d8\u7684\uff0c\u572830\u4e07\u79d2\u5de6\u53f3\u3002\u4f46\u662f\u968f\u7740\u8282\u70b9\u6570\u7684\u589e\u52a0\uff0c\u6267\u884c\u65f6\u95f4\u4e5f\u4f1a\u76f8\u5e94\u7f29\u77ed\u3002\u51e0\u4e4e\u5448\u7ebf\u6027\u9012\u51cf\u3002\u5982\u679c\u6211\u4eec\u4f7f\u7528\u901a\u8fc7CPU\u65f6\u95f4\u8ba1\u8d39\u7684\u201c\u4e91\u8ba1\u7b97\u201d\u673a\u5668\uff0c\u6bcf\u4e2a\u79df\u6237\u7684\u67e5\u8be2\u90fd\u53ef\u4ee5\u5f88\u5feb\uff0c\u6210\u672c\u4e5f\u4f1a\u975e\u5e38\u4f4e\u5ec9\u3002<\/p>\n \u4e00\u4e2a\u5927\u56e2\u961f\u91cc\u9762\uff0c\u603b\u6709\u51e0\u4e2a\u62d6\u6cb9\u74f6\u3002\u5bf9\u4e8e\u6709\u4e07\u4ebf\u6761\u8bb0\u5f55\u7684T5\uff0c\u6211\u4eec\u6267\u884c\u4e0b\u9762\u7684\u8bed\u53e5\u3002<\/p>\n \u503c\u5f97\u6ce8\u610f\u7684\u662fT5\u7684\u6570\u636e\u53ea\u6709\u4e24\u4efd\u62f7\u8d1d\uff0c\u6240\u4ee5\u6709\u66f4\u9ad8\u7684\u6982\u7387\u51fa\u73b0\u574f\u8282\u70b9\u548c\u62d6\u6cb9\u74f6\u3002\u8fd9\u4e2a\u67e5\u8be2\u9700\u8981\u626b\u63cf\u5927\u7ea61TB\u7684\u538b\u7f29\u6570\u636e\uff0c\u4f7f\u75282500\u4e2a\u8282\u70b9\u3002<\/p>\n <\/p>\n \u53ef\u4ee5\u770b\u523099%\u7684\u5206\u533a\u90fd\u57285S\u5185\u5b8c\u6210\u7684\u3002\u4e0d\u5e78\u7684\u662f\uff0c\u6709\u4e00\u4e9b\u5206\u533a\u9700\u8981\u8f83\u957f\u7684\u65f6\u95f4\u6765\u5904\u7406\u3002\u5c3d\u7ba1\u901a\u8fc7\u52a8\u6001\u8c03\u5ea6\u53ef\u4ee5\u52a0\u5feb\u4e00\u4e9b\uff0c\u4f46\u5728\u5982\u6b64\u5927\u89c4\u6a21\u7684\u8ba1\u7b97\u4e0a\u9762\uff0c\u5f88\u96be\u5b8c\u5168\u4e0d\u51fa\u95ee\u9898\u3002\u5982\u679c\u4e0d\u5728\u610f\u592a\u7cbe\u786e\u7684\u7ed3\u679c\uff0c\u5b8c\u5168\u53ef\u4ee5\u5c0f\u5c0f\u51cf\u5c11\u8986\u76d6\u7684\u6bd4\u4f8b\uff0c\u5927\u5927\u63d0\u5347\u76f8\u5e94\u901f\u5ea6\u3002<\/p>\n Google Dremel\u7684\u80fd\u5728\u5982\u6b64\u77ed\u7684\u65f6\u95f4\u5185\u5904\u7406\u8fd9\u4e48\u5927\u7684\u6570\u636e\uff0c\u7684\u786e\u662f\u5341\u5206\u60ca\u8273\u7684\u3002\u6709\u4e2a\u4f2f\u514b\u5229\u5206\u6821\u7684\u6559\u6388Armando Fox\u8bf4\u8fc7\u4e00\u53e5\u8bdd\u201c\u5982\u679c\u4f60\u66fe\u4e8b\u5148\u544a\u8bc9\u6211Dremel\u58f0\u79f0\u5176\u5c06\u53ef\u505a\u4e9b\u4ec0\u4e48\uff0c\u90a3\u4e48\u6211\u4e0d\u4f1a\u76f8\u4fe1\u4f60\u80fd\u5f00\u53d1\u51fa\u8fd9\u79cd\u5de5\u5177\u201d\u3002\u8fd9\u4e48\u7ed9\u529b\u7684\u6280\u672f\uff0c\u5fc5\u7136\u5bf9\u4e1a\u754c\u9020\u6210\u5de8\u5927\u7684\u5f71\u54cd\u3002\u7b2c\u4e00\u4e2a\u88ab\u6ce2\u53ca\u5230\u7684\u5fc5\u7136\u662fHadoop\u3002<\/p>\n Dremel\u7684\u516c\u5f00\u8bba\u6587\u91cc\u9762\u5df2\u7ecf\u8bf4\u7684\u5f88\u660e\u767d\uff0cDremel\u4e0d\u662f\u7528\u6765\u66ff\u4ee3MapReduce\uff0c\u800c\u662f\u548c\u5176\u66f4\u597d\u7684\u7ed3\u5408\u3002Hadoop\u7684Hive\uff0cPig\u65e0\u6cd5\u63d0\u4f9b\u53ca\u65f6\u7684\u67e5\u8be2\uff0c\u800cDremel\u7684\u5feb\u901f\u67e5\u8be2\u6280\u672f\u53ef\u4ee5\u7ed9Hadoop\u63d0\u4f9b\u6709\u529b\u7684\u8865\u5145\u3002\u540c\u65f6Dremel\u53ef\u4ee5\u7528\u6765\u5206\u6790MapReduce\u7684\u7ed3\u679c\u96c6\uff0c\u53ea\u9700\u8981\u5c06MapReduce\u7684OutputFormat\u4fee\u6539\u4e3aDremel\u7684\u683c\u5f0f\uff0c\u5c31\u53ef\u4ee5\u51e0\u4e4e\u4e0d\u5f15\u5165\u989d\u5916\u5f00\u9500\uff0c\u5c06\u6570\u636e\u5bfc\u5165Dremel\u3002\u4f7f\u7528Dremel\u6765\u5f00\u53d1\u6570\u636e\u5206\u6790\u6a21\u578b\uff0cMapReduce\u6765\u6267\u884c\u6570\u636e\u5206\u6790\u6a21\u578b\u3002<\/p>\n Hadoop\u7684Hive,Pig\u73b0\u5728\u4e5f\u6709\u4e86\u5217\u5b58\u7684\u6a21\u5f0f\uff0c\u67b6\u6784\u4e0a\u548cDremel\u4e5f\u63a5\u8fd1\u3002\u4f46\u662f\u65e0\u8bba\u5b58\u50a8\u7ed3\u6784\u8fd8\u662f\u8ba1\u7b97\u65b9\u5f0f\u90fd\u6ca1\u6709Dremel\u7cbe\u81f4\u3002\u5bf9Hadoop\u5b9e\u65f6\u6027\u7684\u6539\u8fdb\u4e5f\u4e00\u76f4\u662f\u4e2a\u70ed\u70b9\u8bdd\u9898\u3002\u8981\u60f3\u5728Hadoop\u4e2d\u5c71\u5be8\u4e00\u4e2aDremel\uff0c\u5e76\u4e14\u76f8\u5bf9\u73b0\u6709\u89e3\u51b3\u65b9\u6848\u6709\u7a81\u7834\uff0c\u7b14\u8005\u89c9\u5f97Hadoop\u81ea\u8eab\u9700\u8981\u4e00\u4e9b\u6539\u8fdb\u3002\u4e00\u4e2a\u662fHDFS\u9700\u8981\u5bf9\u5e76\u53d1\u7ec6\u788e\u7684\u6570\u636e\u8bfb\u6027\u80fd\u6709\u5927\u7684\u6539\u8fdb\uff0cHDFS\u9700\u8981\u66f4\u52a0\u7684\u4f4e\u5ef6\u8fdf\u3002\u518d\u8005\u662fHadoop\u9700\u8981\u4e0d\u4ec5\u4ec5\u652f\u6301MapReduce\u8fd9\u4e00\u79cd\u8ba1\u7b97\u6846\u67b6\u3002\u5176\u4ed6\u90e8\u5206,Hadoop\u90fd\u6709\u5bf9\u5e94\u7684\u5f00\u6e90\u7ec4\u4ef6\uff0c\u4e07\u4e8b\u4ff1\u5907\u53ea\u6b20\u4e1c\u98ce\u3002<\/p>\n Dremel\u73b0\u5728\u8fd8\u6ca1\u6709\u4e00\u4e2a\u53ef\u4ee5\u8fd0\u884c\u7684\u5f00\u6e90\u5b9e\u73b0\uff0c\u4e0d\u8fc7\u6211\u4eec\u770b\u5230\u5f88\u591a\u52aa\u529b\u3002\u4e00\u4e2a\u662fApache\u7684Drill\uff0c\u4e00\u4e2a\u662fOpenDremel\/Dazo\u3002<\/p>\n OpenDremel\/Dazo<\/strong><\/p>\n OpenDremel\u662f\u4e00\u4e2a\u5f00\u6e90\u9879\u76ee\uff0c\u6700\u8fd1\u6539\u540d\u4e3aDazo\u3002\u53ef\u4ee5\u5728GoogleCode\u4e0a\u627e\u5230http:\/\/code.google.com\/p\/dremel\/<\/a>\u3002\u76ee\u524d\u8fd8\u6ca1\u6709\u53d1\u5e03\u3002\u4f5c\u8005\u58f0\u79f0\u4ed6\u5df2\u7ecf\u5b8c\u6210\u4e86\u4e00\u4e2a\u901a\u7528\u6267\u884c\u5f15\u64ce\u548cOpenStack Swift\u7684\u96c6\u6210\u3002\u7b14\u8005\u611f\u89c9\u5176\u8d8a\u8d70\u8d8a\u6b6a\uff0c\u79bbDremel\u8d8a\u6765\u8d8a\u8fdc\u4e86\u3002<\/p>\n\n
Google Dremel\u5e94\u7528\u573a\u666f<\/h4>\n
Google Dremel\u6570\u636e\u6a21\u578b<\/h4>\n
\n
\n
Google Dremel\u67e5\u8be2\u65b9\u5f0f<\/h4>\n
SELECT A, COUNT(B) FROM T GROUP BY A<\/pre>\n
SELECT A, SUM(c) FROM (R1 UNION ALL ... Rn) GROUP BY A<\/pre>\n
?Ri = SELECT A, COUNT(B) AS c FROM Ti GROUP BY A<\/pre>\n
Google Dremel\u6d4b\u8bd5\u5b9e\u9a8c<\/h3>\n
\n\n
\n \u8868\u540d<\/strong><\/td>\n \u8bb0\u5f55\u6570<\/strong><\/td>\n \u5927\u5c0f(<\/strong>\u5df2\u538b\u7f29)<\/strong><\/td>\n \u5217\u6570<\/strong><\/td>\n \u6570\u636e\u4e2d\u5fc3<\/strong><\/td>\n \u590d\u5236\u6570\u91cf<\/strong><\/td>\n<\/tr>\n \n T1<\/td>\n 85 billion<\/td>\n 87 TB<\/td>\n 270<\/td>\n A<\/td>\n 3\u00d7<\/td>\n<\/tr>\n \n T2<\/td>\n 24 billion<\/td>\n 13 TB<\/td>\n 530<\/td>\n A<\/td>\n 3\u00d7<\/td>\n<\/tr>\n \n T3<\/td>\n 4 billion<\/td>\n 70 TB<\/td>\n 1200<\/td>\n A<\/td>\n 3\u00d7<\/td>\n<\/tr>\n \n T4<\/td>\n 1+ trillion<\/td>\n 105 TB<\/td>\n 50<\/td>\n B<\/td>\n 2\u00d7<\/td>\n<\/tr>\n \n T5<\/td>\n 1+ trillion<\/td>\n 20 TB<\/td>\n 30<\/td>\n B<\/td>\n 3\u00d7<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n \u5217\u5b58\u6d4b\u8bd5<\/h4>\n
\n
Dremel\u548cMapReduce\u7684\u5bf9\u6bd4\u6d4b\u8bd5<\/h4>\n
Q1: SELECT SUM(CountWords(txtField)) \/ COUNT(*) FROM T1<\/pre>\n
\u6811\u72b6\u8ba1\u7b97Server\u6d4b\u8bd5<\/h4>\n
Q2: SELECT country, SUM(item.amount) FROM T2 GROUP BY country\n\nQ3: SELECT domain, SUM(item.amount) FROM T2 WHERE domain CONTAINS \u2019.net\u2019 GROUP BY domain<\/pre>\n
\u6bcf\u4e2a\u5206\u533a\u7684\u6267\u884c\u60c5\u51b5<\/h4>\n
\u8bb0\u5f55\u5185\u805a\u5408<\/h4>\n
Q4 : SELECT COUNT(c1 > c2) FROM\n\n(SELECT SUM(a.b.c.d) WITHIN RECORD AS c1,\n\nSUM(a.b.p.q.r) WITHIN RECORD AS c2\n\nFROM T3)<\/pre>\n
\u6269\u5c55\u6027\u6d4b\u8bd5<\/h4>\n
Q5: SELECT TOP(aid, 20), COUNT(*) FROM T4?WHERE bid = fvalue1g AND cid = fvalue2g<\/pre>\n
\u5bb9\u9519\u6d4b\u8bd5<\/h3>\n
Q6: SELECT COUNT(DISTINCT a) FROM T5<\/pre>\n
Google Dremel \u7684\u5f71\u54cd<\/h3>\n
Dremel\u4e0eHadoop<\/h4>\n
Dremel\u7684\u5f00\u6e90\u5b9e\u73b0<\/h4>\n