Re: [sqlite] Index in seperate db file, low impact change?

2006-06-15 Thread drh
Russell Leighton <[EMAIL PROTECTED]> wrote:
> 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
>   oattach database tables.sqlite3 as tables
>   oattach database indices.sqlite3 as indices
>   o end
> 
> 
> Big distruptive code change?

Yes.
--
D. Richard Hipp   <[EMAIL PROTECTED]>



Re: [sqlite] Index in seperate db file, low impact change?

2006-06-15 Thread Lindsay
Russell Leighton wrote:
>
> Big distruptive code change?

Also more opportunites for things to go wrong with mismatched index/db files
Also no longer can copy/move db as a single file


-- 
Lindsay




[sqlite] Index in seperate db file, low impact change?

2006-06-15 Thread Russell Leighton


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
 oattach database tables.sqlite3 as tables
 oattach 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?