0. Close the program
1. Copy the catalog in a new file. ("XnView - copy.db" on my PC)
2. Open the original file in you SQLite tool - it has the page size of 1024.
3. Run the following: "Select * from Datas" limit 2000; (it brings 2000 records from thumbnails table - the most heavy table which we have). On my machine, it finishes in 5,03 secs (5030 milisecs) from a table of 22,5 kiloRecords.
4. Close the original file. Open the copy.
5. Change the page size of the database:
Code: Select all
pragma page_size=4096;
vacuum;
...in fact I knew it.

http://www.sqlite.org/intern-v-extern-blob.html
Also, nowadays (almost) all SQL servers have variable page sizes from you can choose (except MS SQL which has a fixed page size of 8k) but most databases are there: page sizes of 8k and 16k. More rare to be found 4k and 32k (DB2 for example).
You can put in the DB Manager a drop down box labeled Page Size with some values in it. The classical values are 1024, 2048, 4096, 8192, 16384, 32768. In order to display the actual value of Db you use pragma page_size). Next to drop down list put a button called "Change Page Size". When the user presses it, you can throw a message "It will take some time and if isn't used correctly, it can affect performance. Continue?" and if the user chooses "yes" you issue the two comands: "pragma page_size=<new value>" and "vacuum;" like above. When it finishes, perhaps is better to re-read the new page size to see if everything is ok.