[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: wc_db performance

From: Branko Čibej <brane_at_e-reka.si>
Date: Tue, 15 Mar 2011 14:50:02 +0100

On 15.03.2011 11:26, Philip Martin wrote:
> Branko Čibej <brane_at_e-reka.si> writes:
>> The restriction that you may not invoke a callback from within a sqlite
>> transaction remains. That's what the temporary results tables are for --
>> they live outside transactions on the main wc-db.
> I don't understand the temporary table approach. Taking the
> temp__node_props_cache table as an example: it gets populated by a
> transaction and lives beyond that transaction. The table then gets
> queried by a second transaction and the callbacks are made while that
> second transaction is in progress. So callbacks are still being invoked
> from within a transaction.
> As far as I can see using a temporary table has made the overall "read
> properties" operation into one that modifies the database, to create the
> temporary table. I guess that by the time the callbacks are made the
> database write-lock has been dropped, but there would have been no
> write-lock if the temporary table were not used.

The temporary table is:

    * in a different database, so the read lock on it does not affect
      the main wc-db;
    * per-connection, so even the same process using a different
      database connection will not even see that temporary table.

-- Brane
Received on 2011-03-15 14:50:49 CET

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.