couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andy Dorman <>
Subject Re: Optimizing Couchdb Performance
Date Tue, 08 Apr 2014 14:06:53 GMT
On 04/08/2014 05:33 AM, Diogo JĂșnior wrote:
> Well, let's start with the following, I'm using a pattern that might not be scalable
( I would like to have your opinion on this).... I have a database per user ( in my case my
user has a device and each device database is always synchronized with the correspondent server
database). So, one db per user. Is it good or not? What might be the drawbacks?

You can not do queries across databases.

At one time I considered doing a separate database per user because I 
need to limit user access to just their info and that was the only way I 
could think of to do it without writing a server middle layer to control 
access.  Turned out that I need to write that middle layer for other 
reasons, so we switched back to a single db with a document per user. 
This allows us to easily do queries involving multiple users.

FWIW SQL databases have the same issues of course...but in the SQL world 
you would never consider creating a new database (at least I would not) 
for each user.

Andy Dorman

View raw message