Return-Path: X-Original-To: apmail-couchdb-user-archive@www.apache.org Delivered-To: apmail-couchdb-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 EDEB296B2 for ; Fri, 16 Mar 2012 16:20:26 +0000 (UTC) Received: (qmail 22503 invoked by uid 500); 16 Mar 2012 16:20:25 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 22465 invoked by uid 500); 16 Mar 2012 16:20:25 -0000 Mailing-List: contact user-help@couchdb.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@couchdb.apache.org Delivered-To: mailing list user@couchdb.apache.org Received: (qmail 22394 invoked by uid 99); 16 Mar 2012 16:20:23 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 16 Mar 2012 16:20:23 +0000 X-ASF-Spam-Status: No, hits=0.7 required=5.0 tests=RCVD_IN_DNSWL_NONE,SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (athena.apache.org: local policy) Received: from [81.169.146.161] (HELO mo-p00-ob.rzone.de) (81.169.146.161) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 16 Mar 2012 16:20:13 +0000 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; t=1331914791; l=820; s=domk; d=gonvaled.com; h=Content-Type:To:Subject:Date:From:References:In-Reply-To: MIME-Version:X-RZG-CLASS-ID:X-RZG-AUTH; bh=tSMHNtz8kswIdIjLqDwUmxFdJFY=; b=EOZs4a0O25wz7xibbp1JAA6t6MqTtzP1QuvFrFsP3W4vBUMumnjSo4QufyA7juxYhH5 tLcYo/65UbseoNeBcCgAAum6MuZXczvsIm4MwfWrEPuSHE4CZL/SbHcXSRCKv6NLMxSoa B4Shhk98CpBIC5qf6uJXi3LIJ5hC6RO7PcE= X-RZG-AUTH: :K2MKY0GkfvuAYI9OvLYEA55J0qvTZZULi9CTHjqnn8/d41Z9VA5z1TMajByBSJxL X-RZG-CLASS-ID: mo00 Received: from mail-gy0-f180.google.com ([209.85.160.180]) by post.strato.de (mrclete mo13) (RZmta 28.1 AUTH) with ESMTPA id y00e97o2GEX4Jc for ; Fri, 16 Mar 2012 17:19:50 +0100 (MET) Received: by ghbz12 with SMTP id z12so5387731ghb.11 for ; Fri, 16 Mar 2012 09:19:50 -0700 (PDT) Received: by 10.236.184.167 with SMTP id s27mr3492577yhm.8.1331914790168; Fri, 16 Mar 2012 09:19:50 -0700 (PDT) MIME-Version: 1.0 Received: by 10.147.9.11 with HTTP; Fri, 16 Mar 2012 09:19:29 -0700 (PDT) In-Reply-To: References: <003240CB-2132-439B-AD7D-6AFBB00DA352@apache.org> From: Daniel Gonzalez Date: Fri, 16 Mar 2012 17:19:29 +0100 Message-ID: Subject: Re: Size of couchdb documents To: user@couchdb.apache.org Content-Type: text/plain; charset=ISO-8859-1 X-Virus-Checked: Checked by ClamAV on apache.org On Fri, Mar 16, 2012 at 5:03 PM, Alexander Shorin wrote: > Daniel, > > Since you're using Python, have you played with uuid.uuid1 function? > It produce semi-sequential host-based uuids. To make them really > sequential, probably you'd like to reverse uuid value because his > "head" changes often than "tail". This trick could be cheaper that > implementing erlang-friendly base64 encoding. > > -- > ,,,^..^,,, Thanks Alexander, but that won't do. The main requirement to keep performance and size low is to have a really short document_id. With base64 you can number 16 millions of documents with just 4 characters, and over 1 thousand million documents with 5 characters. The number of characters in the doc_id is really a critical parameter when dealing with lots of documents.