Why don't you just attach another database and switch your user connections to 
that one?



Then you can just delete the old file and not worry about vaccum at all.





Sounds though like sqlite3 could use a "truncate" command like Oracle has which 
is the speedy way to zero out a table there.



Michael D. Black
Senior Scientist
Advanced Analytics Directorate
Advanced GEOINT Solutions Operating Unit
Northrop Grumman Information Systems

________________________________
From: sqlite-users-boun...@sqlite.org [sqlite-users-boun...@sqlite.org] on 
behalf of Gabriel Corneanu [gabrielcorne...@gmail.com]
Sent: Thursday, July 19, 2012 10:41 AM
To: sqlite-users@sqlite.org
Subject: EXT :Re: [sqlite] force read schema after "delete from sqlite_master"

>
> Rather than dropping all tables, why not just use
>
> DELETE FROM TABLE myTable
>
> with no clauses ?
>
> Also, I would guess that the thing which is taking most of the time is
> the VACUUM command.  Do you >really need it ?  Are you very short of
> filespace ?  Are you about to make special backup copies of >the newly
> empty tables ?

> Simon.

As I wrote, delete / drop takes a lot of time (try it on a big db). I need
a way to say "quick drop everything", there is nothing to worry about.
Vacuum is instant (after drop tables), which is normal for an empty db.

While space is not a major problem, in my model it is at least unusual.
I use sqlite as file format in an append only model; file size (pages) is
a direct measure of how much data is available.
In this model, I need the "truncate" operation.

I can live with my workaround...

Regards,
Gabriel
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to