View Single Post
Old 12-15-2013, 08:45 PM   #7
davidfor
Grand Sorcerer
davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.
 
Posts: 24,905
Karma: 47303824
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
400K for "a few thousand books" seems high. But, it depends on the number of chapters in the books and the formats. All formats have at least chapter row. epubs have one per chapter in the book and kepubs have two.

To see all the rows for the books (including previews):

Code:
SELECT * FROM content WHERE ContentType = 6 AND IsDownloaded = 'true'
The column "NumShortcovers" tells you how many chapter rows there will be for each book. Summing that will give you a quick number of the expected chapter rows. But that doesn't account for the double count for kepubs. It also should be how many rows are in volume_shortcovers.

Or to get the chapter rows:

Code:
SELECT * FROM content WHERE ContentType in (9, 899)
For my database, the content table has 9696 rows. There are 513 book rows and sum(NumShortcovers) is 7683. There is enough difference there that I checked and there are 1348 ContentType=899 rows. So, 513+7683+1384=9580. Most of the extra rows will be recommendations.

Again, 262173 rows in volume_shortcovers sounds high for a few thousand books. But again it depends on the number of chapters in the books. I have 7700 rows in volume_shortcovers which is close enough to the above to not worry me.

If you have a look at the tables and the numbers above don't match, then you would need to check the consistency between the tables. And you could remove the extra rows.

An alternative is to logout on the device. This replaces the database with an empty one and takes you through the basic setup. It then adds all the books again. If you have the time, you could take a copy of the database, do the logout and then compare the size. If there isn't much difference, put the copy back on to get back to where you were.
davidfor is offline   Reply With Quote