Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Software > Calibre > Library Management

Notices

Reply
 
Thread Tools Search this Thread
Old 06-24-2018, 11:55 AM   #1
un_pogaz
Chalut o/
un_pogaz is on a distinguished road
 
un_pogaz's Avatar
 
Posts: 41
Karma: 50
Join Date: Dec 2017
Device: Kobo
[Feature suggest] Maintenance option: Reindexed the library

First one, a trivial question:
What is the theoretical limit of the library index?
I guess that's an unattainable number, but I'm curious

The thread question:
Would it be possible to make an option of maintenance of the library which allows to re-index the books and to fill the possible voids in the numbering?


So, Yes, I know this is a very delicate operation. The user interface must ther be frozen to prevent any library modification during the process.
But as the operation can be very long, it would be necessary to leave a button "Stop reindexing". Once this button is clicked, Calibre finishes the current book then release the user control.

_____________

Currently, when a book is added, Calibre gives it "last index+1". It is a simple solution, fast and without headache.
I'm nothing against it, and it would be monstrously and unnecessarily complicated to test the free indexes when adding a book (and slowed Calibre)

But, a separate maintenance option, why not.
un_pogaz is offline   Reply With Quote
Old 06-24-2018, 12:11 PM   #2
Terisa de morgan
Grand Sorcerer
Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.
 
Terisa de morgan's Avatar
 
Posts: 5,065
Karma: 5438918
Join Date: Jun 2009
Location: Madrid, Spain
Device: Kobo Clara/Aura One/Forma,XiaoMI 5, iPad, Huawei MediaPad, YotaPhone 2
As somebody who comes from the software world, unless you reach the limit of the index (maximum number allowed by the size of the field), it doesn't make sense for me
Terisa de morgan is offline   Reply With Quote
Advert
Old 06-24-2018, 12:11 PM   #3
DaltonST
Deviser
DaltonST rocks like Gibraltar!DaltonST rocks like Gibraltar!DaltonST rocks like Gibraltar!DaltonST rocks like Gibraltar!DaltonST rocks like Gibraltar!DaltonST rocks like Gibraltar!DaltonST rocks like Gibraltar!DaltonST rocks like Gibraltar!DaltonST rocks like Gibraltar!DaltonST rocks like Gibraltar!DaltonST rocks like Gibraltar!
 
DaltonST's Avatar
 
Posts: 1,277
Karma: 100614
Join Date: Aug 2013
Location: Texas
Device: 8" Win10 Tablet w/Calibre64
Good joke. Very funny. It makes me smile. Have a nice day.
DaltonST is offline   Reply With Quote
Old 06-24-2018, 12:32 PM   #4
un_pogaz
Chalut o/
un_pogaz is on a distinguished road
 
un_pogaz's Avatar
 
Posts: 41
Karma: 50
Join Date: Dec 2017
Device: Kobo
Quote:
Originally Posted by Terisa de morgan View Post
As somebody who comes from the software world, unless you reach the limit of the index (maximum number allowed by the size of the field), it doesn't make sense for me
Badum Tsss
un_pogaz is offline   Reply With Quote
Old 06-24-2018, 01:52 PM   #5
Terisa de morgan
Grand Sorcerer
Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.
 
Terisa de morgan's Avatar
 
Posts: 5,065
Karma: 5438918
Join Date: Jun 2009
Location: Madrid, Spain
Device: Kobo Clara/Aura One/Forma,XiaoMI 5, iPad, Huawei MediaPad, YotaPhone 2
Quote:
Originally Posted by un_pogaz View Post
Badum Tsss
Mí no comprender.
Terisa de morgan is offline   Reply With Quote
Advert
Old 06-24-2018, 04:05 PM   #6
Adoby
Handy Elephant
Adoby ought to be getting tired of karma fortunes by now.Adoby ought to be getting tired of karma fortunes by now.Adoby ought to be getting tired of karma fortunes by now.Adoby ought to be getting tired of karma fortunes by now.Adoby ought to be getting tired of karma fortunes by now.Adoby ought to be getting tired of karma fortunes by now.Adoby ought to be getting tired of karma fortunes by now.Adoby ought to be getting tired of karma fortunes by now.Adoby ought to be getting tired of karma fortunes by now.Adoby ought to be getting tired of karma fortunes by now.Adoby ought to be getting tired of karma fortunes by now.
 
Adoby's Avatar
 
Posts: 1,402
Karma: 9071146
Join Date: Dec 2009
Location: Southern Sweden, far out in the quiet woods
Device: Ubuntu LTS, Huawei Mediapad 5, Bouye Likebook Plus
The procedure is: (not tested...)

Save all your books to disk, making sure to save covers and complete updated metadata in opf:s.
Create a new empty calibre library, with the same structure as the old.
Import all the saved books to the new library, reading metadata from OPF:s.
Enjoy lovely low index numbers without gaps. For a while...

Test first on a small representative subset of books...

It is essentially a database dump and restore from dump. I remember when that was the usual way to speed up and compact databases...
Adoby is offline   Reply With Quote
Old 06-24-2018, 04:28 PM   #7
theducks
Well trained by Cats
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 22,280
Karma: 22142024
Join Date: Aug 2009
Location: (The original) Silicon Valley, USA
Device: K4NT, Galaxy Tab A
Quote:
Originally Posted by un_pogaz View Post
The thread question:
Would it be possible to make an option of maintenance of the library which allows to re-index the books and to fill the possible voids in the numbering?
I was taught to NEVER reuse an (key)index, least an orphan became reattached.


OTOH Doing the Copy To Library gives the book a new assignment (and is not susceptible to orphans) as part of the task. If the destination starte empty, they will be sequential
theducks is online now   Reply With Quote
Old 06-24-2018, 07:23 PM   #8
BetterRed
null operator
BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.
 
Posts: 11,323
Karma: 10578436
Join Date: Mar 2012
Location: Sydney Australia
Device: none
@un_pogaz - why do you care?

BR
BetterRed is offline   Reply With Quote
Old 06-24-2018, 10:53 PM   #9
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 33,621
Karma: 10209576
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
There's never going to be such a feature. book ids are meant to be stable, they are for instance, used in content server urls. You can of course do it yourself by using various tricks such as copy to library to a new library, but I strongly recommend against it.
kovidgoyal is offline   Reply With Quote
Old 06-25-2018, 05:07 AM   #10
un_pogaz
Chalut o/
un_pogaz is on a distinguished road
 
un_pogaz's Avatar
 
Posts: 41
Karma: 50
Join Date: Dec 2017
Device: Kobo
@BetterRed Why not ? More precisely, I see my library growing more and more, I am not worried, but just curious.


@Adoby Nope,I don't recommend this method. The best is what Kovid suggests: Move your library in a another via Calibre. Use "Save to disk" would be doubly longer (writing then adding) and uncertain.


@kovidgoyal Yes, it is an easy solution that has the merit of already being implemented.
However, it has a flaw: The "Move books" function copies all books and deletes all books only if the operation ends normally.
If the operation is interrupted, even via the button designed for, the books already copied are not deleted from the source library. Result, duplicates between the 2 libraries.

A mass move (Select all > Move to library) is such an enormous risk that it makes it impossible.
So you stay in front of Calibre and move your library, 100 by 100 (for exemple), manually.

One solution would be to copy the books and delete them 1 by 1, gradually. This might be slower than the current method, but it would be a true "Move to library" function.
I leave you to judge this change.

Thank for answer

Last edited by un_pogaz; 06-25-2018 at 12:16 PM.
un_pogaz is offline   Reply With Quote
Old 06-25-2018, 06:04 AM   #11
BetterRed
null operator
BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.
 
Posts: 11,323
Karma: 10578436
Join Date: Mar 2012
Location: Sydney Australia
Device: none
@un_pogaz - why renumber the Books table, and not the other tables with auto incremented primary keys, viz:

Click image for larger version

Name:	1.JPG
Views:	113
Size:	355.4 KB
ID:	164649

This may be of interest ==>> Implementation Limits For SQLite.

BR
BetterRed is offline   Reply With Quote
Old 06-25-2018, 12:05 PM   #12
un_pogaz
Chalut o/
un_pogaz is on a distinguished road
 
un_pogaz's Avatar
 
Posts: 41
Karma: 50
Join Date: Dec 2017
Device: Kobo
From the page Implementation Limits For SQLite
Quote:
Maximum Number Of Rows In A Table

The theoretical maximum number of rows in a table is 264 (18446744073709551616 or about 1.8e+19). This limit is unreachable since the maximum database size of 140 terabytes will be reached first. A 140 terabytes database can hold no more than approximately 1e+13 rows, and then only if there are no indices and if each row contains very little data.

Maximum Database Size

Every database consists of one or more "pages". Within a single database, every page is the same size, but different database can have page sizes that are powers of two between 512 and 65536, inclusive. The maximum size of a database file is 2147483646 pages. At the maximum page size of 65536 bytes, this translates into a maximum database size of approximately 1.4e+14 bytes (140 terabytes, or 128 tebibytes, or 140,000 gigabytes or 128,000 gibibytes).
18446744073709551616 row or/and 140 terabytes database size

Hum
I think we can rest easy.
un_pogaz is offline   Reply With Quote
Old 06-25-2018, 01:03 PM   #13
DoctorOhh
US Navy, Retired
DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.
 
DoctorOhh's Avatar
 
Posts: 9,660
Karma: 13739682
Join Date: Feb 2009
Location: North Carolina
Device: Icarus Illumina XL HD, Nexus 7
Quote:
Originally Posted by un_pogaz View Post
Hum
I think I can rest easy.

I corrected it for you, peace.
DoctorOhh is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Killer Feature I suggest desk7 Onyx Boox 9 07-07-2017 03:17 AM
Missing Library/Library Maintenance button babyshelley Library Management 2 06-20-2015 02:05 PM
Library Maintenance option missing? xterminal Library Management 3 08-27-2012 04:48 PM
Library Maintenance feature removed? Trickery Library Management 1 03-04-2011 03:14 PM


All times are GMT -4. The time now is 01:49 PM.


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