Return-Path: X-Original-To: apmail-hbase-user-archive@www.apache.org Delivered-To: apmail-hbase-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id C43539242 for ; Thu, 13 Sep 2012 14:30:25 +0000 (UTC) Received: (qmail 80500 invoked by uid 500); 13 Sep 2012 14:30:23 -0000 Delivered-To: apmail-hbase-user-archive@hbase.apache.org Received: (qmail 80444 invoked by uid 500); 13 Sep 2012 14:30:23 -0000 Mailing-List: contact user-help@hbase.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@hbase.apache.org Delivered-To: mailing list user@hbase.apache.org Received: (qmail 80436 invoked by uid 99); 13 Sep 2012 14:30:23 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 13 Sep 2012 14:30:23 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=FSL_RCVD_USER,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of doug.meil@explorysmedical.com designates 216.32.180.189 as permitted sender) Received: from [216.32.180.189] (HELO co1outboundpool.messaging.microsoft.com) (216.32.180.189) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 13 Sep 2012 14:30:15 +0000 Received: from mail29-co1-R.bigfish.com (10.243.78.230) by CO1EHSOBE008.bigfish.com (10.243.66.71) with Microsoft SMTP Server id 14.1.225.23; Thu, 13 Sep 2012 14:29:54 +0000 Received: from mail29-co1 (localhost [127.0.0.1]) by mail29-co1-R.bigfish.com (Postfix) with ESMTP id BA0617200C5 for ; Thu, 13 Sep 2012 14:29:54 +0000 (UTC) X-Forefront-Antispam-Report: CIP:157.56.241.133;KIP:(null);UIP:(null);IPV:NLI;H:BL2PRD0411HT001.namprd04.prod.outlook.com;RD:none;EFVD:NLI X-SpamScore: -4 X-BigFish: PS-4(zzbb2dI98dI9371I1432Izz1202h1d1ah1d2ahzz17326ah8275bh8275dhz2fh2a8h668h839h946he5bhf0ah107ah1288h12a5h12a9h12bdh1155h) Received-SPF: pass (mail29-co1: domain of explorysmedical.com designates 157.56.241.133 as permitted sender) client-ip=157.56.241.133; envelope-from=doug.meil@explorysmedical.com; helo=BL2PRD0411HT001.namprd04.prod.outlook.com ;.outlook.com ; Received: from mail29-co1 (localhost.localdomain [127.0.0.1]) by mail29-co1 (MessageSwitch) id 1347546592586128_19804; Thu, 13 Sep 2012 14:29:52 +0000 (UTC) Received: from CO1EHSMHS032.bigfish.com (unknown [10.243.78.250]) by mail29-co1.bigfish.com (Postfix) with ESMTP id 8CE5EDC0053 for ; Thu, 13 Sep 2012 14:29:52 +0000 (UTC) Received: from BL2PRD0411HT001.namprd04.prod.outlook.com (157.56.241.133) by CO1EHSMHS032.bigfish.com (10.243.66.42) with Microsoft SMTP Server (TLS) id 14.1.225.23; Thu, 13 Sep 2012 14:29:51 +0000 Received: from BL2PRD0411MB397.namprd04.prod.outlook.com ([169.254.11.150]) by BL2PRD0411HT001.namprd04.prod.outlook.com ([10.255.130.36]) with mapi id 14.16.0190.008; Thu, 13 Sep 2012 14:29:47 +0000 From: Doug Meil To: "user@hbase.apache.org" Subject: Re: Hbase Scan - number of columns make the query performance way different Thread-Topic: Hbase Scan - number of columns make the query performance way different Thread-Index: AQHNkbnzdKxpcwcwqkiHvwciwPesoZeIEegA Date: Thu, 13 Sep 2012 14:29:47 +0000 Message-ID: In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.255.130.4] Content-Type: text/plain; charset="Windows-1252" Content-ID: <4E903E9D46C27B4D8B55C7A94BF86F30@namprd04.prod.outlook.com> Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: explorysmedical.com X-Virus-Checked: Checked by ClamAV on apache.org Hi there, I don't know the specifics of your environment, but ... http://hbase.apache.org/book.html#perf.reading 11.8.2. Scan Attribute Selection =8A describes paying attention to the number of columns you are returning, particularly when using HBase as a MR source. In short, returning only the columns you need means you are reducing the data transferred between the RS and the client and the number of KV's evaluated in the RS, etc. On 9/13/12 10:12 AM, "Shengjie Min" wrote: >Hi, > >I found an interesting difference between hbase scan query. > >I have a hbase table which has a lot of columns in a single column family. >eg. let's say I have a users table, then userid, username, email .... etc >etc 15 fields all together are in the single columnFamily. > >if you are familiar with RDBMS, > >query 1: select * from users >vs >query 2: select userid, username from users > >in mysql, these two has a difference, the query 2 will be obviously >faster, >but two queries won't give you a huge difference from performance >perspective. > >In Hbase, I noticed that: > >query 3: scan 'users', // this is basically return me all 15 fields >vs >query 4: scan 'users', {COLUMNS=3D>['cf:userid','cf:username']} // this >is >return me only two fields: userid , username > >query 3 here takes way longer than query 4, Given a big data set. In my >test, I have around 1,000,000 user records. You are talking about query 3 >- >100 secs VS query 4 - a few secs. > > >Can anybody explain to me, why the width of the resultset in HBASE can >impact the performance that much? > > >Shengjie Min