incubator-couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Damien Katz <dam...@apache.org>
Subject Re: Short keys == faster lookups?
Date Sat, 03 Oct 2009 19:49:37 GMT

On Oct 3, 2009, at 3:43 PM, Paul Davis wrote:

> Technically speaking you could probably engineer keys to exhibit bad
> collation behavior, but that'd take some thought. Something like 1KiB
> or larger keys with long identical prefixes.
>
> That said, measure twice, code once. I've never heard any numbers on  
> it.

Good advice. My knowledge of couchdb internals says shorter is faster,  
but by how much, I don't know. Probably not much. Definitely benchmark  
with production sized data to see if it makes any significant  
difference.

-Damien

>
> Paul Davis
>
> On Sat, Oct 3, 2009 at 9:29 AM, Per Ejeklint <ejeklint@mac.com> wrote:
>> Please excuse a silly question from a newbie. I have a db that  
>> grows pretty
>> fast (data measurements done every minute all year around). I  
>> wonder what I
>> save if I mangle keys to be as short as possible. Like instead of  
>> calling
>> things "temp_outside" I rename them to "t_o" or something like it.  
>> The size
>> of the db will of course shrink, but will it do anything for  
>> indexing/lookup
>> speed when I search in the db?
>>
>> /Per
>>


Mime
View raw message