Reputation: 75
I have a couch database called restaurants.couch and once a week I would Compact Database and the file size will go from 20MB to 11MB.
I see that the older versions are gone - which I don't need.
However, I notice that the .restaurants_design folder size is over 100MB and there are 30+ .view files in here.
I executed Compact Views and Clean Up Views, and it reduced it to 8MB and to just 1 .view file. My app also ran a little faster.
My questions :
1) Why does .restaurants_design get so large ? What's the reason. It's just a view.
2) What's the benefit of Compact Views and Clean Up Views ( besides file size reduction ) ?
3) What are the side effects of Compact Views and Clean Up Views ? Will I ever regret doing this if I don't need versioning ?
4) How often should Compact Database, Compact Views, and Clean Up Views be performed if the app does not really need versioning other than a simple nosql database with some views.
Upvotes: 2
Views: 548
Reputation: 5414
View indexes on disk are named after their MD5 hash of the view definition. When you change a view, old indexes remain on disk. To clean up all outdated view indexes (files named after the MD5 representation of views, that does not exist anymore) you can trigger a view cleanup:
. Clean Up Views however, remove old views caches, since if you update a view, the old result of the view is still on disk.Compact Views
and Clean Up Views
does not effect versioning, but Compact Database
does.Upvotes: 2