Given you can attach multiple database files in sqlite, perhaps it could be extended such that:

   * When you name an index, you optionally prepend the database name
     which can be in another currently attached db
   * You attached to multiple db files that have cross references as:
         o begin
         o    attach database tables.sqlite3 as tables
         o    attach database indices.sqlite3 as indices
         o end


The idea being that all the xref checks happen at the end of the transaction. If you attach to a file with external refererences that are not found at the end of the transaction it fails. If you reference any tables without current xrefs complete (e.g., put a 'select' or 'insert' between 2 attach statements above) then it fails because the referenced table is 'inactive' due to pending xrefs.

The advantages of allowing extension are:

   * backward compatible to previous usage
   * likely better performance due to locality and caching
         o Some queries only need the index
   * manage indices better, for optimal performance 1 index per file
     for a really big index

Big distruptive code change?


Reply via email to