[sqlite] Wierd problems with 3.2.1 under macosx 10.3.9

2005-04-22 Thread Tobias Rundström
Hello,
We (XMMS2 Team) have been using SQLite for quite some time now, it's 
used to cache metainformation about songs played. It can also be used 
to be searched and store addtional information. SQLite fits us very 
well and have been a good complement to xmms2.

My primary platform is MacOSX and when we recently switched to sqlite 
3.2.1 from sqlite 2.8.x I've started to note strange problems.

First of all performance is TERRIBLE, without syncronous=off I see 
insert times of up to 1 second for one row?!
Secondly after holding the DB open and not sending any querys to it for 
quite some time (3-4 hours) I often get a corrupted database (error 
from SQLite is database file is damaged or encrypted).

The performance problems has also been spotted by another macosx user.
My sqlite installation is vanilla complied from source with macosx 
shipped gcc.

Anyone expericing the same?
Greetings Tobias


Re: [sqlite] Wierd problems with 3.2.1 under macosx 10.3.9

2005-04-22 Thread D. Richard Hipp
On Fri, 2005-04-22 at 09:10 +0200, Tobias Rundstrm wrote:
 First of all performance is TERRIBLE, without syncronous=off I see 
 insert times of up to 1 second for one row?!

This is the F_FULLFSYNC issue.  It's a sad hardware story and there is
nothing that software can do to fix it.  Google for the details.

If you disable the F_FULLFSYNC, it will go much faster.

 Secondly after holding the DB open and not sending any querys to it for 
 quite some time (3-4 hours) I often get a corrupted database (error 
 from SQLite is database file is damaged or encrypted).

What do you mean holding the DB open?  If you you do not send
it any queries, you can you get an error?  Please explain the problem
in more detail.
-- 
D. Richard Hipp [EMAIL PROTECTED]



Re: [sqlite] Wierd problems with 3.2.1 under macosx 10.3.9

2005-04-22 Thread Tobias Rundström
Thanks for your reply,
D. Richard Hipp wrote:
On Fri, 2005-04-22 at 09:10 +0200, Tobias Rundstrm wrote:
First of all performance is TERRIBLE, without syncronous=off I see 
insert times of up to 1 second for one row?!

This is the F_FULLFSYNC issue.  It's a sad hardware story and there is
nothing that software can do to fix it.  Google for the details.
If you disable the F_FULLFSYNC, it will go much faster.
Compiletime change or some pragma?
Secondly after holding the DB open and not sending any querys to it for 
quite some time (3-4 hours) I often get a corrupted database (error 
from SQLite is database file is damaged or encrypted).

What do you mean holding the DB open?  If you you do not send
it any queries, you can you get an error?  Please explain the problem
in more detail.
Sorry I was unclear.
I open the database, do some inserts(). idle for 3-4 hours without 
closing the handle and then do some selects it will give me that error.

-- Tobias


Re: [sqlite] Wierd problems with 3.2.1 under macosx 10.3.9

2005-04-22 Thread D. Richard Hipp
On Fri, 2005-04-22 at 13:30 +0200, Tobias Rundstrm wrote:
  If you disable the F_FULLFSYNC, it will go much faster.
 
 Compiletime change or some pragma?
 

PRAGMA synchronous=NORMAL;

 Secondly after holding the DB open and not sending any querys to it for 
 quite some time (3-4 hours) I often get a corrupted database (error 
 from SQLite is database file is damaged or encrypted).
  
  
  What do you mean holding the DB open?  If you you do not send
  it any queries, you can you get an error?  Please explain the problem
  in more detail.
 
 Sorry I was unclear.
 
 I open the database, do some inserts(). idle for 3-4 hours without 
 closing the handle and then do some selects it will give me that error.
 

Sounds to me like some other process is coming along and
messing with the database file while your original process
is setting idle.
-- 
D. Richard Hipp [EMAIL PROTECTED]