Thomas, if i understand you correctly:

1. Place the writing of multiple rows of data inside a transaction.
2. Querry performance will not be affected by the transaction.

So, If you have multiple rows and are doing something like the following:

    1. Begin Transaction
    2. Read data from somewhere.
    3. Insert to sqlite
    4. Querry sqlite 
    5. Update sqlite.
    6. Repeat 2-5, till no more data.
    7. Commit.

Now depending upon how much data you may wish to add a step to periodically 
commit and start a new Txn.
        5a. if (rows loaded Mod some number ) commit txn ... Begin Txn.



Thomas DILIGENT <[EMAIL PROTECTED]> wrote: Igor Tandetnik wrote:
> Thomas DILIGENT  wrote:
>> What about the performance issue ?
>
> What about it?
>
> You need to provide some context. Your questions, standing alone, 
> don't make much sense, no offence intended. What problem are you 
> trying to solve, and what specifically are you concerned about?

The program I am working on performs the following steps:
- transform events from a trace into persistent (C++ and java) objects 
that are stored to and load from a sqlite database.
- query objects for analysis.

Only one client accesses this database in the same time, i.e. we do not 
have any synchronisation issue.

As queries are performed on object's load and store, the sequence of 
queries depends on the usage of these objects, i.e. the incoming events.

In this context, I try to improve speed of database accesses :
Instead of using autocommit, I would like to start and end transactions 
which would contain a fixed number (as an example) of transactions.

First question : Will transactions increase speed ?

In the first step, objects are stored and may be queried to retrieve 
some information.
As a result, since objects load and store are performed regarding 
incoming events, queries are performed in an undeterministic way.

Thus I have to define a strategy that hooks object load and store in 
order to perform begin and commit at the judicious time.

Second question : When to perform begin and commit ?
In this context, is it realistic and judicious to perform begin at the 
beginning of the first step and commit at the end of the first step ?

Hope this is clear enough ...

Thomas

>
> Igor Tandetnik
>
> ----------------------------------------------------------------------------- 
>
> To unsubscribe, send email to [EMAIL PROTECTED]
> ----------------------------------------------------------------------------- 
>
>
>


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


Reply via email to