View Single Post
Old 01-02-2014, 12:26 PM   #6
unboggling
Wizard
unboggling ought to be getting tired of karma fortunes by now.unboggling ought to be getting tired of karma fortunes by now.unboggling ought to be getting tired of karma fortunes by now.unboggling ought to be getting tired of karma fortunes by now.unboggling ought to be getting tired of karma fortunes by now.unboggling ought to be getting tired of karma fortunes by now.unboggling ought to be getting tired of karma fortunes by now.unboggling ought to be getting tired of karma fortunes by now.unboggling ought to be getting tired of karma fortunes by now.unboggling ought to be getting tired of karma fortunes by now.unboggling ought to be getting tired of karma fortunes by now.
 
Posts: 1,065
Karma: 858115
Join Date: Jan 2011
Device: Kobo Clara, Kindle Paperwhite 10
Quote:
Originally Posted by kovidgoyal View Post
1 and 2 are exactly the same and they do not check for files. They will be faster than 3. Though given all the optimization and caching that goes on, the speed difference is not going to be very large.

Searching in calibre does not use sql at all, all searching is done on an in memory data structure that stores all metadata, using custom algorithms. SQLITE does not have powerful enough capabilities to power the search in calibre.

The only time actual files are checked is if you use the formats() template function, and even then they are only checked once. Simply searching does not recheck the files.
Thank you, Kovid. That answered my questions.

So to make sure I understand this, in other words searches are conducted against data structures read into RAM from metadata.db then specially massaged at library startup. So whether a field is indexed or not in the backend doesn't really matter that much after library startup.
unboggling is offline   Reply With Quote