Re: [sqlite] Still chasing "database schema has changed"

2011-09-28 Thread Petite Abeille
On Sep 28, 2011, at 1:25 AM, Richard Hipp wrote: > Hence I ask: have you actually measured the difference? Please join the BAAG party :) http://www.battleagainstanyguess.com/ ___ sqlite-users mailing list sqlite-users@sqlite.org

Re: [sqlite] Still chasing "database schema has changed"

2011-09-28 Thread Simon Slavin
On 28 Sep 2011, at 3:01pm, Tim Streater wrote: > No, I've done no tests. I'm not concerned that each database be down to its > smallest possible size, merely that the app have a mechanism that, from time > to time, compresses certain databases through which most of the apps traffic > flows

Re: [sqlite] Still chasing "database schema has changed"

2011-09-28 Thread Tim Streater
On 28 Sep 2011 at 00:25, Richard Hipp wrote: > On Tue, Sep 27, 2011 at 7:16 PM, Tim Streater wrote: > >> On 27 Sep 2011 at 18:15, Richard Hipp wrote: >> >>> On Tue, Sep 27, 2011 at 1:13 PM, Tim Streater >> wrote:

Re: [sqlite] Still chasing "database schema has changed"

2011-09-27 Thread Richard Hipp
On Tue, Sep 27, 2011 at 7:16 PM, Tim Streater wrote: > On 27 Sep 2011 at 18:15, Richard Hipp wrote: > > > On Tue, Sep 27, 2011 at 1:13 PM, Tim Streater > wrote: > > > >> The databases that get vacuumed tend to have a fair amount of

Re: [sqlite] Still chasing "database schema has changed"

2011-09-27 Thread Tim Streater
On 27 Sep 2011 at 18:15, Richard Hipp wrote: > On Tue, Sep 27, 2011 at 1:13 PM, Tim Streater wrote: > >> The databases that get vacuumed tend to have a fair amount of traffic in >> and out. So it's good to compress them from time to time. > > Really?

Re: [sqlite] Still chasing "database schema has changed"

2011-09-27 Thread Richard Hipp
On Tue, Sep 27, 2011 at 1:13 PM, Tim Streater wrote: > > The databases that get vacuumed tend to have a fair amount of traffic in > and out. So it's good to compress them from time to time. > Really? Have you actually measured this to see if it makes a difference? What

Re: [sqlite] Still chasing "database schema has changed"

2011-09-27 Thread Tim Streater
On 27 Sep 2011 at 12:23, Simon Slavin wrote: > On 27 Sep 2011, at 10:49am, Tim Streater wrote: > >> On 27 Sep 2011 at 00:19, Simon Slavin wrote: >> >>> I believe that VACUUM is one of the statements which counts as changing the >>> schema, because it

Re: [sqlite] Still chasing "database schema has changed"

2011-09-27 Thread Simon Slavin
On 27 Sep 2011, at 10:49am, Tim Streater wrote: > On 27 Sep 2011 at 00:19, Simon Slavin wrote: > >> I believe that VACUUM is one of the statements which counts as changing the >> schema, because it does its work by rewriting entire tables and/or indexes. >> So don't do

Re: [sqlite] Still chasing "database schema has changed"

2011-09-27 Thread Tim Streater
On 27 Sep 2011 at 00:19, Simon Slavin wrote: > On 26 Sep 2011, at 11:32pm, Tim Streater wrote: >> But, very often the database on which the error occurs is :memory: - and I >> guess each thread will have its own one of those. > > Are you doing concurrent access to your

Re: [sqlite] Still chasing "database schema has changed"

2011-09-27 Thread Tim Streater
On 27 Sep 2011 at 00:19, Simon Slavin wrote: > On 26 Sep 2011, at 11:32pm, Tim Streater wrote: > >> For the most part it's going to be SELECT, INSERT, UPDATE, BEGIN, COMMIT. >> Less often, there's VACUUM. Let me have a look at my logs - OK, when I got >> the error today,

Re: [sqlite] Still chasing "database schema has changed"

2011-09-26 Thread Simon Slavin
On 26 Sep 2011, at 11:32pm, Tim Streater wrote: > For the most part it's going to be SELECT, INSERT, UPDATE, BEGIN, COMMIT. > Less often, there's VACUUM. Let me have a look at my logs - OK, when I got > the error today, there was a thread doing a VACUUM on the db which got the > error (within

Re: [sqlite] Still chasing "database schema has changed"

2011-09-26 Thread Stephan Beal
On Tue, Sep 27, 2011 at 12:32 AM, Tim Streater wrote: > But, very often the database on which the error occurs is :memory: - and I > guess each thread will have its own one of those. > Not only each thread, but each reference to ":memory:" within a process is independent

Re: [sqlite] Still chasing "database schema has changed"

2011-09-26 Thread Tim Streater
On 26 Sep 2011 at 22:40, Simon Slavin wrote: > On 26 Sep 2011, at 10:30pm, Tim Streater wrote: >> My question now is, if two or more PHP scripts are competing for access to >> the same database, is "database schema has changed" a possible outcome? > > Well, let's see what

Re: [sqlite] Still chasing "database schema has changed"

2011-09-26 Thread Simon Slavin
On 26 Sep 2011, at 10:30pm, Tim Streater wrote: > it's quite possible that it can ask apache to run three or four threads more > or less simultaneously, each of which may want to modify the same set of > SQLite databases. Each such thread is a PHP script using the PDO interface; > this is

[sqlite] Still chasing "database schema has changed"

2011-09-26 Thread Tim Streater
Thinking some more about the occasional instances of "database schema has changed" that I experience, I took a look through the amalgamation to see where this error might be being detected. Reading the code and the comments I'm reminded of something I keep forgetting: that SQLite has no server.