couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Simon Metson <>
Subject Re: Pruning a couchdb database
Date Mon, 27 Sep 2010 15:36:44 GMT
Hi John,
	How about having the date in the database name e.g:


Pruning then becomes a case of dropping the database en masse, e.g. to  
kill all records in a certain time window.

That said, pulling out a view and doing a bulk delete shouldn't be too  
slow. Also, don't forget to compact the database after you delete  
records from it!

On 27 Sep 2010, at 16:26, John Logsdon wrote:

> Hi
> I need to hold, potentially, millions of call records in a couchdb  
> cluster
> and using a management process periodically truncate the records  
> based on
> their age. I can see how I can get the Set of matching records using  
> a View
> but how do I delete them in the same operation? My understanding is  
> that I
> can only GET from a View so I cant see how to do this without  
> bringing the
> data back to the client and issuing a DELETE for each record which  
> would be
> a real problem wrt performance.
> Regards
> John

View raw message