View Single Post
  #13  
Old 10-18-2007, 02:52 PM
kinook kinook is online now
Administrator
 
Join Date: 03-06-2001
Location: Colorado
Posts: 6,032
The regular compact+repair routines assume that the underlying database file is intact, but may be fragmented and/or contain orphaned records, incorrect computed values, or other SQL errors within the stored tables.

A "malformed database" error indicates that the SQLite database engine is unable to read part of the database file, which means that the actual file has been corrupted on disk. Normally when this error is reported, a regular compact/repair will also fail, as it performs a scan of the entire .urd file, which will encounter any bad block(s).

The external repair tool works similar to a compact operation (read the entire database and completely recreate it without unused blocks), but it is able to skip bad blocks, which allows the operation to complete even when the actual .urd file is corrupted. I'm not really sure how performance could be significantly improved using this method vs. regular compact.
Reply With Quote