On 4/03/10 15:35, eric casteleijn wrote:
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

Thanks for the tips, really helpful.
I will probably use that strategy to partition my data per experiment. And use an external watcher script like in couchdb-lounge to replicate my common design documents in all databases. And store summary data and meta data in a separate database so I can do easily queries spanning different dbs.

Tom

Reply via email to