WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: sqlite database optimization  (Read 2699 times)

Offline tinypoodle

  • Hero Member
  • *****
  • Posts: 3857
sqlite database optimization
« on: May 16, 2013, 05:12:00 PM »
Dependencies:

sqlite3-bin.tcz
file.tcz

Sample output:
(Note: Output from a system where sqlite databases had already been optimized earlier, hence no difference in numbers. General expectation would be sizes after processing potentially to be much smaller than before)

Code: [Select]
tc@box:~$ sqltidy01.sh     

sqltidy.sh - script to vacuum and reindex sqlite databases 

(C) 2013 tinypoodle, distributed under the GPLv2, NO WARRANTY

version 0.1 BETA

Searching for existing sqlite databases in rootfs...

128.0K  /home/tc/.config/hv3
4.0K    /home/tc/.mozilla/seamonkey/1ha2ntq3.default/formhistory.sqlite
12.0K   /home/tc/.mozilla/seamonkey/1ha2ntq3.default/signons.sqlite
4.0K    /home/tc/.mozilla/seamonkey/1ha2ntq3.default/cookies.sqlite
140.0K  /home/tc/.mozilla/seamonkey/1ha2ntq3.default/places.sqlite
4.0K    /home/tc/.mozilla/seamonkey/1ha2ntq3.default/permissions.sqlite
4.0K    /home/tc/.mozilla/firefox/7tmsczzw.default/search.sqlite

Vacuuming and reindexing...

New size:

128.0K  /home/tc/.config/hv3
4.0K    /home/tc/.mozilla/seamonkey/1ha2ntq3.default/formhistory.sqlite
12.0K   /home/tc/.mozilla/seamonkey/1ha2ntq3.default/signons.sqlite
4.0K    /home/tc/.mozilla/seamonkey/1ha2ntq3.default/cookies.sqlite
140.0K  /home/tc/.mozilla/seamonkey/1ha2ntq3.default/places.sqlite
4.0K    /home/tc/.mozilla/seamonkey/1ha2ntq3.default/permissions.sqlite
4.0K    /home/tc/.mozilla/firefox/7tmsczzw.default/search.sqlite

All done!

tc@box:~$
« Last Edit: May 20, 2013, 08:08:45 AM by tinypoodle »
"Software gets slower faster than hardware gets faster." Niklaus Wirth - A Plea for Lean Software (1995)

Offline coreplayer2

  • Hero Member
  • *****
  • Posts: 3020
Re: sqlite database optimization
« Reply #1 on: May 16, 2013, 08:50:35 PM »
nice, thankyou

 8)

Offline gwalther

  • Full Member
  • ***
  • Posts: 128
Re: sqlite database optimization
« Reply #2 on: May 20, 2013, 07:31:00 AM »
Tried this......found you also need.... sqlite3-bin.tcz ...installed.

Offline tinypoodle

  • Hero Member
  • *****
  • Posts: 3857
Re: sqlite database optimization
« Reply #3 on: May 20, 2013, 08:09:53 AM »
Correct, thank you very much for reporting!  :)

OP adapted accordingly.
"Software gets slower faster than hardware gets faster." Niklaus Wirth - A Plea for Lean Software (1995)