database not cleaned when removing a repository
If i add a (big) repository to a project, the db table 'changes' is filled with lot of stuff.
Too much in my case. I've removed the repository from the project by unselecting 'repository' in the module list from the configuration.
After this the database is still very large. I've looked in the table 'changes' and all changes related to this repository is still there.
#2 Updated by Thomas Capricelli almost 11 years ago
looking on internet, i managed to do it this way:
sqlite3 mydb.sqlite3 delete from changes where changes.changeset_id in (select changesets.id from changesets where changesets.repository_id=12); delete from changesets where changesets.repository_id=12;
Though i dont know if this is the right way of doing it.
(and still, i would prefer redmien to handle this for me)
#5 Updated by Jean-Philippe Lang almost 11 years ago
- Status changed from New to Closed
- Target version set to 0.8
- Resolution set to Fixed
Removing a big repository could take a lot of time indeed.
Anyway, r1666 should fix it. Deletion is now done using 2 raw sql queries. Before that, one query was done for each changeset.
#6 Updated by Thomas Capricelli almost 11 years ago
- Target version deleted (
Hi Jean-Philippe. I updated to "Revision: 1666", did the rake thinguy and tested my website : everything works as expected.I did the same manipulation as previously :
- add the huge repository (db size goes from 4mb to 63mb)
- remove the huge repository (db size unchanged)
To reduce the size, i had to manually edit the db ("sqlite3 production.db") and type "VACUUM;" which is the command for sqlite to clean up its data. I thought maybe you would want to issue this from redmine too. I understand this is highly dependant on the db and maybe this is difficult and/or not something you would want.