"Mina R Waheeb" <[EMAIL PROTECTED]> wrote:
> Hi,
>    I have few questions regarding the limitation of multiple databases with
> SQLite.
> 
> I have a large number of SQLite DB files with the same structure i
> need to query them all (looking for speed), I have tried ATTACH method
> and its working fine but there is a limitation on the number of
> attached files
> 
> in sqlitelimit.h
> /*
> ** The maximum number of attached databases.  This must be at least 2
> ** in order to support the main database file (0) and the file used to
> ** hold temporary tables (1).  And it must be less than 32 because
> ** we use a bitmask of databases with a u32 in places (for example
> ** the Parse.cookieMask field).
> */
> 
> - Is there is any way or patch to increase the number of attached
> files more than 32?

You could change the unsigned 32-bit integer used for the mask into
an unsigned 64-bit integer.  This will be tricky, though, as a lot
of things will need to change.

> 
> - is SQLite open FD to each attached database or open it on request?

Actually, 3 file descriptors per attached database.

> 
> - Once the SQLite library loaded in memory, How much the new
> connection cost of the system resources mainly in the memory?

That depends on the size of the database schema.

> 
> - If the schema is standard (Will not change), Is there is anyway just
> switch between the FD to avoid reparse on startup? sorry maybe this is
> a stupid question but i dunno much about SQLite internals.
> 

No.


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


-----------------------------------------------------------------------------
To unsubscribe, send email to [EMAIL PROTECTED]
-----------------------------------------------------------------------------

Reply via email to