Aha.  I shall give it a try, and see how I fare.

Many thanks,
Ian

On 3/6/07, Marco Bambini <[EMAIL PROTECTED]> wrote:

Are you using sqlite_prepare or sqlite_prepare_v2?
If you use the v2 version I think that your problem will be solved...

Regards,
---
Marco Bambini
http://www.sqlabs.net
http://www.sqlabs.net/blog/
http://www.sqlabs.net/realsqlserver/



On Mar 6, 2007, at 2:22 PM, Ian Frosst wrote:

> Hey all, I've got a bit of an odd situation going on.  I have a fairly
> heavily threaded app making use of SQLite (which is working
> beautifully for
> the most part.)  However, I've run into a bit of a situation.  It
> seems that
> I have a periodic occurrence of SQLITE_SCHEMA occurring when
> executing some
> queries.  I've pretty much narrowed this down to the interaction of
> two
> threads working with the database.  One is a simple insert, and the
> other is
> a fairly complicated db processing, consisting of three parts:
>
> 1) Create a temporary table with the results of a query
> 2) Create an index on the temporary table
> 3) Use the indexed temporary table in another query
>
> The reason I'm doing the above is that the query executed in step 3
> contains
> a sub-query, which can potentially return a large amount of data.
> I was
> finding that without any type of indexing on the data coming back
> from this
> sub-query, my performance was unacceptable.
>
> My theory regarding the SQLITE_SCHEMA error is that the creation of
> the
> index on the temporary table is causing a change to the schema
> revision
> number, but I'm not quite familiar enough with the code to verify
> this.  I
> was hoping someone on the list could enlighten me as to:
>
> - Whether creations of temporary tables, or the creation of indexes
> on these
> tables incur schema updates
> - If the above is the case, whether there are any strategies for
> avoiding
> this situation.
>
> Thanks,
> Ian



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

-----------------------------------------------------------------------------


Reply via email to