Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre

Notices

Reply
 
Thread Tools Search this Thread
Old 05-16-2012, 03:47 AM   #1
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 74,542
Karma: 129670952
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
What is the best way to defragment the SQL database?

What is the best way to defragment (speed up) Calibre's SQL database used for a given library?
JSWolf is online now   Reply With Quote
Old 05-16-2012, 04:03 AM   #2
chaley
Grand Sorcerer
chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.
 
Posts: 11,774
Karma: 7029857
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Library (dropdown menu) -> Library Maintenance -> Check Library. This function dumps the db to SQL, re-initializes the db, then reloads it from the SQL.

Defragging your file system after the check library can help by ensuring that the db is not spread over the disk. Defragging before might be just as good, assuming the defragger consolidates free space.
chaley is offline   Reply With Quote
Advert
Old 05-16-2012, 08:04 AM   #3
gaspine
Member
gaspine began at the beginning.
 
Posts: 15
Karma: 12
Join Date: Apr 2012
Device: ipad
execute the "vacuum" sql insctruction, cause sqlite3 keep space when used 1 time :
http://www.sqlite.org/lang_vacuum.html
gaspine is offline   Reply With Quote
Old 05-16-2012, 08:49 AM   #4
chaley
Grand Sorcerer
chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.
 
Posts: 11,774
Karma: 7029857
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by gaspine View Post
execute the "vacuum" sql insctruction, cause sqlite3 keep space when used 1 time :
http://www.sqlite.org/lang_vacuum.html
Calibre's check library will reclaim space used by orphaned records and guarantees row ids will not change, neither of which vacuum does.
chaley is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Can Excel SQL query get metadata out of calibredb? unboggling Calibre 24 01-20-2011 02:45 AM
Using SQL against Calibre database jjansen Calibre 3 03-29-2010 10:14 AM
SQL Queries iain_benson Calibre 9 06-04-2009 06:08 PM


All times are GMT -4. The time now is 11:23 AM.


MobileRead.com is a privately owned, operated and funded community.