Digikam/Check Database: Difference between revisions

From KDE UserBase Wiki
(Created page with "<languages /> <translate> == Check and Optimize digiKam’s Databases == Transcribed from Dmitri Popov's blog, 19 December 2011 By default,'''digiKam''' uses two ''SQLite datab...")
 
(Marked this version for translation)
Line 2: Line 2:
<translate>
<translate>


== Check and Optimize digiKam’s Databases ==
== Check and Optimize digiKam’s Databases == <!--T:1-->
Transcribed from Dmitri Popov's blog, 19 December 2011
Transcribed from Dmitri Popov's blog, 19 December 2011


<!--T:2-->
By default,'''digiKam''' uses two ''SQLite databases'' for storing essential data: ''digikam4.db'' and ''thumbnails-digikam.db''. And to make the application run fast and smoothly, it’s a good idea to check and optimize the databases every now and then. To do this on Ubuntu or its derivatives, you need to install the <tt>sqlite3</tt> package using the <code>sudo apt-get install sqlite3</code> command. Once you’ve done that, back up the digikam4.db and thumbnails-digikam.db databases. Open then the terminal and switch to the directory where the databases are stored. First off, you should check the integrity of both databases using the following commands:
By default,'''digiKam''' uses two ''SQLite databases'' for storing essential data: ''digikam4.db'' and ''thumbnails-digikam.db''. And to make the application run fast and smoothly, it’s a good idea to check and optimize the databases every now and then. To do this on Ubuntu or its derivatives, you need to install the <tt>sqlite3</tt> package using the <code>sudo apt-get install sqlite3</code> command. Once you’ve done that, back up the digikam4.db and thumbnails-digikam.db databases. Open then the terminal and switch to the directory where the databases are stored. First off, you should check the integrity of both databases using the following commands:


<!--T:3-->
{{Input|1=sqlite3 -line digikam4.db 'pragma integrity_check;'
{{Input|1=sqlite3 -line digikam4.db 'pragma integrity_check;'
sqlite3 -line thumbnails-digikam.db 'pragma integrity_check;'}}
sqlite3 -line thumbnails-digikam.db 'pragma integrity_check;'}}


<!--T:4-->
If both databases are in order, you should see the message {{Output|1=integrity_check = ok}}   
If both databases are in order, you should see the message {{Output|1=integrity_check = ok}}   


<!--T:5-->
To optimize the databases, run the two commands below:
To optimize the databases, run the two commands below:


<!--T:6-->
{{Input|1-sqlite3 -line digikam4.db 'vacuum;'
{{Input|1-sqlite3 -line digikam4.db 'vacuum;'
sqlite3 -line thumbnails-digikam.db 'vacuum;'}}
sqlite3 -line thumbnails-digikam.db 'vacuum;'}}


<!--T:7-->
Run then the integrity check once again to make sure that everything works properly, and you are done.
Run then the integrity check once again to make sure that everything works properly, and you are done.


<!--T:8-->
[[Category:Graphics]]
[[Category:Graphics]]
[[Category:Photography]]
[[Category:Photography]]
[[Category:Tutorials]]
[[Category:Tutorials]]
</translate>
</translate>

Revision as of 18:56, 24 December 2011

Other languages:

Check and Optimize digiKam’s Databases

Transcribed from Dmitri Popov's blog, 19 December 2011

By default,digiKam uses two SQLite databases for storing essential data: digikam4.db and thumbnails-digikam.db. And to make the application run fast and smoothly, it’s a good idea to check and optimize the databases every now and then. To do this on Ubuntu or its derivatives, you need to install the sqlite3 package using the sudo apt-get install sqlite3 command. Once you’ve done that, back up the digikam4.db and thumbnails-digikam.db databases. Open then the terminal and switch to the directory where the databases are stored. First off, you should check the integrity of both databases using the following commands:

sqlite3 -line digikam4.db 'pragma integrity_check;'
sqlite3 -line thumbnails-digikam.db 'pragma integrity_check;'

If both databases are in order, you should see the message

integrity_check = ok

To optimize the databases, run the two commands below:

1-sqlite3 -line digikam4.db 'vacuum;'
sqlite3 -line thumbnails-digikam.db 'vacuum;'

Run then the integrity check once again to make sure that everything works properly, and you are done.