Re: Database file size issues
Tom Fillmore <[email protected]>
| Newsgroups | gmane.comp.python.db.pysqlite.user |
|---|---|
| Message-ID | <1173395866.5468.6.camel@lap510> |
Hi, there - See the following link, it might be the answer you are looking for... http://www.sqlite.org/lang_vacuum.html In short, VACUUM tidies up the database. Tom Fillmore On Fri, 2007-03-09 at 00:05 +0100, Andrea Gavana wrote: > Hi All, > > I am a user of SQLAlchemy, from which I access the sqlite > database. I don't know if this is the right forum to post, but I only > use Python so I thought that maybe someone of you may know the answer. > I know next to nothing about databases, so please forgive my > newbieness. I attach a simple demo, which unfortunately uses > SQLAlchemy (with sqlite as database). In this small demo, at the end, > setting the variable newDataBase=True will create a new database of > about 120 Kb by adding some data to it. Then, re-running the script > and setting newDataBase=False, the demo loads the database, deletes > *everything* from the database, and then exits. > Well, curiously enough, the size of the database is still 120 Kb, even > if I deleted everything. > The main problem, is that the real database I am using increases in > size *forever*, no matter what I do or what I delete. I can add 1000 > items to my real database, growing it to 10 MB, then delete everything > and still have an empty database of 10 MB. There is no reduction in > the database size, never. That can be an issue if after 2 months I > have a database file of 4 GB with nothing inside. > I have written to the SQLAlchemy maintainer, and he said it is an > issue only with sqlite, not with other databases. > Is there anyone that can actually try my small demo and maybe suggest > what I should do? > > Thank you for your time and for your suggestions. > > Andrea. > > "Imagination Is The Only Weapon In The War Against Reality." > http://xoomer.virgilio.it/infinity77/ > _______________________________________________ > pysqlite mailing list > pysqlite-IAPFreCvJWPBWskQ1e/[email protected] > http://lists.initd.org/mailman/listinfo/pysqlite