Re: [sqlite] Journal file question

2007-04-18 Thread Joe Wilson
--- DragonK <[EMAIL PROTECTED]> wrote: > I'm having the following problem: a sqlite database file is on an NTFS > filesystem, in a directory with no permissions to create new files, but only > to modify the original database. By using filemon i've noticed some access > denied errors when sqlite

Re: [sqlite] SQLite and memory usage

2007-04-18 Thread Nuno Lucas
On 4/18/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: I performed a simple experiment where i placed printf statements in the routines sqlite3FreeX and sqlite3MallocRaw. They seem to be the two lowest level routines in SQLite that allocate and deallocate memory. I redirected the output to

Re: [sqlite] SQLite and memory usage

2007-04-18 Thread Andrew Finkenstadt
Is it conceivable that the buffer cache is what occupies this undeallocated memory? --andy On 4/18/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: I performed a simple experiment where i placed printf statements in the routines sqlite3FreeX and sqlite3MallocRaw. They seem to be the two lowest

[sqlite] SQLite and memory usage

2007-04-18 Thread rhurst2
I performed a simple experiment where i placed printf statements in the routines sqlite3FreeX and sqlite3MallocRaw. They seem to be the two lowest level routines in SQLite that allocate and deallocate memory. I redirected the output to a text file and imported it into Excel (this may have been

Re: [sqlite] Fortran 95 Language Bindings

2007-04-18 Thread Liam Healy
Arjen, I've taken another look at these bindings, and at my project. For a variety of reasons, most not related to the sqlite3 Fortran bindings, I have decided to proceed in a different direction. However, on closer examination of the Fortran bindings and other language bindings to sqlite3 (C

[sqlite] warnings on x86_64 w/ 3.3.16

2007-04-18 Thread Kipp Cannon
Hi, I'm just writing to report a few compiler warnings that might be of interest. I get the following warnings when compiling sqlite 3.3.16 with gcc 4.0.2 on a 64-bit Fedora Core 4 system (running on an opteron). These are the only warnings generated by the build. Thanks!

Re: [sqlite] linux and java

2007-04-18 Thread John Stanton
Try Ubuntu. It is gaining raving fans. Alex McFerron wrote: I need to get a laptop up and running with linux, java, and sql lite any suggestions on the fastest way, the best linux distribution, the code to connect java to sql lite? I think I can find the code to connect java to sql lite on

[sqlite] linux and java

2007-04-18 Thread Alex McFerron
I need to get a laptop up and running with linux, java, and sql lite any suggestions on the fastest way, the best linux distribution, the code to connect java to sql lite? I think I can find the code to connect java to sql lite on the java sun forums. well, any suggestions before I just pick a

Re: [sqlite] Still getting "Insertion failed because database isfull." errors

2007-04-18 Thread Joel Cochran
On 4/18/07, Dan Kennedy <[EMAIL PROTECTED]> wrote:If the win32 SetFilePointer() function fails (used to position the "pointer" at a given file offset, which SQLite does as part of a SELECT) SQLite assumes the reason is that the disk is full and returns SQLITE_FULL. This is probably what's

RE: [sqlite] Still getting "Insertion failed because database isfull." errors

2007-04-18 Thread Samuel R. Neff
Another option is to change the SQLite.NET wrapper to automatically retry on SQLITE_FULL error similar to the way it handles a schema error. Then it would be transparent to your app. It would have to close and reopen the connection of course, not just retry, but still the solution is manageable

RE: [sqlite] Still getting "Insertion failed because database isfull." errors

2007-04-18 Thread Robert Simpson
> -Original Message- > From: Christian Schwarz [mailto:[EMAIL PROTECTED] > Sent: Wednesday, April 18, 2007 7:25 AM > To: sqlite-users@sqlite.org > Subject: AW: [sqlite] Still getting "Insertion failed because database > isfull." errors > > > the database residing on removable media. When

Re: [sqlite] Still getting "Insertion failed because database isfull." errors

2007-04-18 Thread Joel Cochran
I was able to recreate this problem on the testing device (but NOT in DEBUG, of course). I pulled up the application, did some operations, and then let the device go to sleep. I then powered back up, and the first operation I tried to do threw the error. Joel On 4/18/07, Christian Schwarz

Re: [sqlite] Still getting "Insertion failed because database isfull." errors

2007-04-18 Thread Joel Cochran
OK, I understand. This was my initial instinct, that it had to be coming from the Database, which was why I contacted DRH. His reponse was basically that my symptoms didn't match a problem in SQLite, given the other information at hand, and he is correct. So really, it isn't SQLite's problem

Re: [sqlite] Journal file question

2007-04-18 Thread DragonK
On 4/18/07, Cesar Rodas <[EMAIL PROTECTED]> wrote: I think is imposible... what you need to do is to create a dbname.db-journalform a dbname.db and set permission to truncate, write, but not for delete.. that is what i suggest, but i didnt try it... If you're suggesting to create a dummy

Re: [sqlite] Journal file question

2007-04-18 Thread Cesar Rodas
I think is imposible... what you need to do is to create a dbname.db-journalform a dbname.db and set permission to truncate, write, but not for delete.. that is what i suggest, but i didnt try it... On 18/04/07, DragonK <[EMAIL PROTECTED]> wrote: Hi, I'm having the following problem: a

AW: [sqlite] Still getting "Insertion failed because database isfull." errors

2007-04-18 Thread Christian Schwarz
> the database residing on removable media. When the system returns, the > "pointer" to the media is not guaranteed to work again. In other words, The file handle remains perfectly valid when the media has not been removed or changed. Besides, I've observed that sometimes the media is not

Re: [sqlite] Still getting "Insertion failed because database isfull." errors

2007-04-18 Thread Jonas Sandman
Or you can close the database connection if it's idle for a little bit (less than it takes for it to sleep)? On 4/18/07, Joel Cochran <[EMAIL PROTECTED]> wrote: OK, then I won't be worrying about Transactions for SELECT statements, it doesn't really apply to our application. And some

Re: [sqlite] Still getting "Insertion failed because database isfull." errors

2007-04-18 Thread Joel Cochran
OK, then I won't be worrying about Transactions for SELECT statements, it doesn't really apply to our application. And some additionaly confirmation that Christian seems to have been right on key: according to the problems reported at the System.Data.SQLite forums, the problem is most likely due

Re: [sqlite] Efficiency and Pragmas

2007-04-18 Thread Eduardo Morras
> >On 4/18/07, Samuel R. Neff <[EMAIL PROTECTED]> wrote: >> >>cache is per-connection so if you open and close connections a lot then a >>large cache won't help your program. The command line app is a single >>connection so a large cache there will help (although not with the first

[sqlite] Journal file question

2007-04-18 Thread DragonK
Hi, I'm having the following problem: a sqlite database file is on an NTFS filesystem, in a directory with no permissions to create new files, but only to modify the original database. By using filemon i've noticed some access denied errors when sqlite attempted to create the journal files.

Re: [sqlite] Efficiency and Pragmas

2007-04-18 Thread drh
"Jonas Sandman" <[EMAIL PROTECTED]> wrote: > What is the default setting for PRAGMA cache_size ? > Where is it defined? > The default size is 2000. You can change this at compile-time by setting -DSQLITE_DEFAULT_CACHE_SIZE=12345 -- D. Richard Hipp <[EMAIL PROTECTED]>

Re: [sqlite] Still getting "Insertion failed because database isfull." errors

2007-04-18 Thread Joel Cochran
OK, now I am confused... On 4/18/07, Samuel R. Neff <[EMAIL PROTECTED]> wrote: One thing to note is that the SQLite.NET wrapper by default issues all transactions as "BEGIN IMMEDIATE" so if you're running the SELECT within a transaction it will be within the context of an exclusive

Re: [sqlite] Still getting "Insertion failed because database isfull." errors

2007-04-18 Thread drh
"Joel Cochran" <[EMAIL PROTECTED]> wrote: > should I be using > Transactions for SELECT statements? The only reason to use a transaction around SELECT statements is if you want to make sure that the database is not changed by another process in between consecutive SELECTs. It used to be the

Re: [sqlite] Efficiency and Pragmas

2007-04-18 Thread Jonas Sandman
What is the default setting for PRAGMA cache_size ? Where is it defined? On 4/18/07, Samuel R. Neff <[EMAIL PROTECTED]> wrote: cache is per-connection so if you open and close connections a lot then a large cache won't help your program. The command line app is a single connection so a large

RE: [sqlite] Efficiency and Pragmas

2007-04-18 Thread Samuel R. Neff
cache is per-connection so if you open and close connections a lot then a large cache won't help your program. The command line app is a single connection so a large cache there will help (although not with the first queries--only subsequent ones). Synchronous off is dangerous. Search the

RE: [sqlite] Still getting "Insertion failed because database isfull." errors

2007-04-18 Thread Samuel R. Neff
One thing to note is that the SQLite.NET wrapper by default issues all transactions as "BEGIN IMMEDIATE" so if you're running the SELECT within a transaction it will be within the context of an exclusive transaction (that's what BEGIN IMMEDIATE means, right?). You can override this by using

Re: [sqlite] Still getting "Insertion failed because database is full." errors

2007-04-18 Thread Joel Cochran
Hi Christian, This is really interesting. What is the official definition of suspension? On handheld devices, the device suspends itself every minute or so to save battery life. All the user does is press the power button and the application is back. Is that the level of suspension you are

Re: [sqlite] Still getting "Insertion failed because database is full." errors

2007-04-18 Thread Joel Cochran
Hi Dan, Responses inline: On 4/18/07, Dan Kennedy <[EMAIL PROTECTED]> wrote: > At first I thought this had solved the problem, because all in house testing > runs beautifully. However, as soon as the device is sent to the field, the > error starts again. Unfortunately, it means that I have

Re: [sqlite] SQLite Performance

2007-04-18 Thread Hugh Gibson
> SELECT * FROM tetragrams > WHERE word1 = 'x' AND word2||'' = 'y' > ORDER BY occs; Better as SELECT * FROM tetragrams WHERE word1 = 'x' AND +word2 = 'y' ORDER BY occs; See http://www.sqlite.org/optoverview.html section 6. Hugh

Re: [sqlite] SQLite Performance

2007-04-18 Thread Dan Kennedy
On Wed, 2007-04-18 at 11:06 +0100, Alberto Simões wrote: > On 4/17/07, Alberto Simões <[EMAIL PROTECTED]> wrote: > > On 4/17/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > > "=?ISO-8859-1?Q?Alberto_Sim=F5es?=" <[EMAIL PROTECTED]> wrote: > > > > > > > > Consider the following database schema:

Re: [sqlite] SQLite Performance

2007-04-18 Thread Alberto Simões
On 4/17/07, Alberto Simões <[EMAIL PROTECTED]> wrote: On 4/17/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > "=?ISO-8859-1?Q?Alberto_Sim=F5es?=" <[EMAIL PROTECTED]> wrote: > > > > Consider the following database schema: > > CREATE TABLE tetragrams (word1 INTEGER, word2 INTEGER, word3

[sqlite] Found the problem: Re: [sqlite] Is this a valid syntax

2007-04-18 Thread Stef Mientki
I found the problem and have a workaround now. The problem is caused by a selection field, which is a text field, that might be null. This field can either be - null - empty string (don't know if this is different from null) -'0' - 0 (don't know if this is different from the string

[sqlite] Efficiency and Pragmas

2007-04-18 Thread Alberto Simões
Hi I am using these pragmas for efficiency in data loading (I hope) PRAGMA page_size = 4096; PRAGMA temp_store = MEMORY; PRAGMA cache_size = 100; PRAGMA synchronous = OFF; PRAGMA count_changes = 0; The truth is that adding these pragmas my inserts got quite faster. Now the

AW: [sqlite] Still getting "Insertion failed because database is full." errors

2007-04-18 Thread Christian Schwarz
Hello Joel! We were faced with similar problems in the field, too. Those were more general ones with PCMCIA/CF/SD cards. The reason was that the mobile devices (different device types with Windows CE 4.1 and 5.0) doesn't handle the access to removable media gracefully when the device is going to