Differences between revisions 1 and 5 (spanning 4 versions)
Revision 1 as of 2009-06-27 18:26:58
Size: 485
Editor: SamatJain
Comment:
Revision 5 as of 2019-02-11 00:37:07
Size: 643
Editor: SamatJain
Comment:
Deletions are marked like this. Additions are marked like this.
Line 5: Line 5:
{{{ {{{#!highlight sh numbers=off
Line 10: Line 10:

== Other stuff ==

{{{#!highlight sh
# Dump to stdout, w/out headers.
sqlite3 -noheader test.db 'select * from users'
}}}
Line 11: Line 19:
CategoryCheetSheet CategoryCheatSheet

Compacting SQLite databases

On occasion SQLite databases need to be compacted. Data contained within a database may be much smaller than the file's actual disk usage (this can occur in certain situations where many rows are deleted). To compact all SQLite databases in your home directory:

find ~ -name '*.sqlite' -exec sqlite3 '{}' 'VACUUM;' \;

Many applications are now using SQLite for storing data, such as Amarok, Firefox, etc.

Other stuff

   1 # Dump to stdout, w/out headers.
   2 sqlite3 -noheader test.db 'select * from users'


CategoryCheatSheet

SamatsWiki: CheatSheet/SQLite (last edited 2019-02-11 00:37:07 by SamatJain)