incubator-couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Karpinski <stefan.karpin...@gmail.com>
Subject Re: quick poll - how many databases do you have?
Date Tue, 24 Feb 2009 20:27:55 GMT
It seems awkward to have to name your databases (external) so that the
directory structure of the storage system (interal) is happy. Would it not
make sense for couchdb to automatically store databases in a tree to avoid
this concern? SHA1 hashing the name of the database and then using the first
k letters of the hex hash value would make a lot of sense. That would allow
database names to contain anything you want without having to worry about
whether the filesystem allows those characters, and it's inherently case
insensitive. It also would automatically balance the number of items in each
directory.

On Tue, Feb 24, 2009 at 7:12 AM, Jan Lehnardt <jan@apache.org> wrote:

>
> On 24 Feb 2009, at 15:03, Sho Fukamachi wrote:
>
>
>> On 21/02/2009, at 10:40 AM, Jan Lehnardt wrote:
>>
>>  Many. For certain applications it makes sense to have a db per user.
>>>
>>
>> Careful with that approach if there is any chance of having a lot of
>> users, or you don't control the machine. All the database files go into one
>> directory.
>>
>> Personally I consider the "too many files in one directory" hype to be a
>> little overdone but still wouldn't want more than a few thousand, and if
>> you're not root, I've seen low limits set by quota systems as well which
>> could be an issue in managed environments.
>>
>> Just something to bear in mind ...
>>
>
>
> Quoting http://wiki.apache.org/couchdb/HTTP_database_API
>
>  All database files are stored in a single directory on the file system. If
> your database includes a / CouchDB will create a sub-directory structure in
> the database directory. That is, a database named his/her, the database file
> will be available at $dbdir/his/her.couch. This is useful when you a large
> number of databases and your file system does not like that.
>
> Cheers
> Jan
> --
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message