Skip to content

CouchDB data removal #3458

Answered by nickva
AroshanFernando asked this question in Q&A
Mar 25, 2021 · 2 comments · 2 replies
Discussion options

You must be logged in to vote

Would you be able to query data across multiple databases or do you have to have only a single primary database for the clients to talk to?

If you can query multiple dbs, you could create a new db every month, then your query would have to find the range of dbs (this assumes time is part of every query), query them and aggregate the results in the application layer. And then to get rid of old data, you could simply delete dbs that are older than 6 months. To handle the switchover, if some clients might be updating the old dbs for a bit, you could start a filtered replication from previous dbs to ensure you bring any of those updates to the new db if they belong there. Depending exactly ho…

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
1 reply
@AroshanFernando
Comment options

Comment options

You must be logged in to vote
1 reply
@AroshanFernando
Comment options

Answer selected by nickva
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants