Return-Path: Delivered-To: apmail-hbase-user-archive@www.apache.org Received: (qmail 31112 invoked from network); 23 Dec 2010 07:15:09 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 23 Dec 2010 07:15:09 -0000 Received: (qmail 21349 invoked by uid 500); 23 Dec 2010 07:15:08 -0000 Delivered-To: apmail-hbase-user-archive@hbase.apache.org Received: (qmail 21254 invoked by uid 500); 23 Dec 2010 07:15:07 -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 21246 invoked by uid 99); 23 Dec 2010 07:15:07 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 23 Dec 2010 07:15:07 +0000 X-ASF-Spam-Status: No, hits=3.7 required=10.0 tests=FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of octo47@gmail.com designates 209.85.161.41 as permitted sender) Received: from [209.85.161.41] (HELO mail-fx0-f41.google.com) (209.85.161.41) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 23 Dec 2010 07:14:59 +0000 Received: by fxm12 with SMTP id 12so231267fxm.14 for ; Wed, 22 Dec 2010 23:14:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:mime-version:received:in-reply-to :references:from:date:message-id:subject:to:content-type; bh=KDZ9OZAEF/FSB2jUwEH+bB26jj0Jl0nSsW8XqgaCB10=; b=mE4o84zDBILIEOl8jtBcYnLkpGYzbKz5T96ksMx3qHu9xNgJ4/jlZhrHbP69S22PIX lu+olBtRvTMURUPdxvUF5eDvMGUBVzE3DKPxzG7XutVJ02tmJc16t2sZqFojnQUK5Z6d nda8R/UDmBDdPg1tIjk36iIFl/h568dbTObLo= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; b=q+1gxy3lw/ebJtQdMBvxJ4qWDQYTsqvOQ228EbGNYAK/ij5LqPAN51+YqYOfY6saCN onopWOIjgnSGhxmeRgxgUQYpKR0u8gHBYc9GvbgNbgVgwsQxXVgqyzCJtbLGLsdjZMp0 lyHb04MhljOv1arYsSC73H3b+ylhYKMsZjIzA= Received: by 10.223.101.140 with SMTP id c12mr7583876fao.16.1293088478843; Wed, 22 Dec 2010 23:14:38 -0800 (PST) MIME-Version: 1.0 Received: by 10.223.117.67 with HTTP; Wed, 22 Dec 2010 23:14:18 -0800 (PST) In-Reply-To: <8A904C2E-F3BA-445C-91B3-29CC000A3F7B@gmail.com> References: <8A904C2E-F3BA-445C-91B3-29CC000A3F7B@gmail.com> From: Andrey Stepachev Date: Thu, 23 Dec 2010 10:14:18 +0300 Message-ID: Subject: Re: Insert into tall table 50% faster than wide table To: user@hbase.apache.org Content-Type: multipart/alternative; boundary=20cf3054a60b71d51f04980e9f7f X-Virus-Checked: Checked by ClamAV on apache.org --20cf3054a60b71d51f04980e9f7f Content-Type: text/plain; charset=UTF-8 I think row locks slows down here. Each row you inserted tries to aquire lock, and then release it. Wide table has significally less rows, and much less locks acquired during insert. 2010/12/23 Bryan Keller > I have been testing a couple of different approaches to storing customer > orders. One is a tall table, where each order is a row. The other is a wide > table where each customer is a row, and orders are columns in the row. I am > finding that inserts into the tall table, i.e. adding rows for every order, > is roughly 50% faster than inserts into the wide table, i.e. adding a row > for a customer and then adding columns for orders. > > In my test, there are 10,000 customers, each customer has 600 orders and > each order has 10 columns. The tall table approach results in 6 mil rows of > 10 columns. The wide table approach results is 10,000 rows of 6,000 columns. > I'm using hbase 0.89-20100924 and hadoop 0.20.2. I am adding the orders > using a Put for each order, submitted in batches of 1000 as a list of Puts. > > Are there techniques to speed up inserts with the wide table approach that > I am perhaps overlooking? > > --20cf3054a60b71d51f04980e9f7f--