incubator-couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From eric casteleijn <eric.castele...@canonical.com>
Subject Re: couchdb for genome data
Date Thu, 04 Mar 2010 14:35:00 GMT
On 03/04/2010 06:23 AM, Metin Akat wrote:
> No, there is no limit.
> And you can structure them in subdirectories by using a slash in the
> database name.
> Like "your/name/here"   will create 2 subdirectories with a database
> called "here" at the bottom.

A few 1000 should be no problem, we have quite a bit more than that per 
server. As Metin writes, at some point it becomes a really good idea to 
use slashes to namespace them, because you'll run into underlyin 
filesystem issues if you don't. We're taking the first 6 characters of 
the md5 hash of the database name, split those into two 3 character 
strings, and use those as database name prefixes. This may be overkill 
for just a few thousand, but you could employ a more minimal version of 
that strategy to keep the directories manageable. Of course the database 
urls don't get any prettier when you do this.

Note: when using slashes in db names, these should always be encoded to 
%2Fs so the database name your/name/here is actually your%2Fname%2Fhere 
and you'd do well to use that form everywhere, or things can break. 
(Unfortunately, in my view, using slashes *sometimes* works, for 
instance in Futon, which promotes the idea that you can actually use 
them as well. </pet_pieve>)

eric

Mime
View raw message