Re: [sqlite] page cache vs OS cache

2010-11-20 Thread Max Vlasov
On Sat, Nov 20, 2010 at 5:44 AM, Yang tedd...@gmail.com wrote: I wonder why we need page cache, since we already have OS file cache. in other words, if we simply set OS cache to be very large, would it have the same effect as page cache? Yang, sqlite operates on some level of

[sqlite] How to disable and enable constraints in SQLite ?

2010-11-20 Thread Andreas Mucha
Hello all, i have to copy data from some database into an SQLite database. The fasted way for me would be to copy simply all tables. To do so i have to disable all SQLite - constraints, copy data and finally enable the constraints again. How can this be done ? Thanx in advance. Andreas -- GMX

Re: [sqlite] How to disable and enable constraints in SQLite ?

2010-11-20 Thread Simon Slavin
On 19 Nov 2010, at 1:52pm, Andreas Mucha wrote: i have to copy data from some database into an SQLite database. The fasted way for me would be to copy simply all tables. To do so i have to disable all SQLite - constraints, copy data and finally enable the constraints again. There's no easy

[sqlite] Command line client and Tcl interface behaves differently?

2010-11-20 Thread Fredrik Karlsson
Dear list, I am having a silly problem, and need your expertise. I just want to initiate a SQLite database using a schema file in Tcl, but I just get an empty database whatever I do. I asked this question on the Tcl list, and got a reply which I interpret to mean that this is not a problem in my

Re: [sqlite] Command line client and Tcl interface behaves differently?

2010-11-20 Thread Richard Hipp
On Sat, Nov 20, 2010 at 8:25 AM, Fredrik Karlsson dargo...@gmail.comwrote: Dear list, I am having a silly problem, and need your expertise. I just want to initiate a SQLite database using a schema file in Tcl, but I just get an empty database whatever I do. I asked this question on the Tcl

Re: [sqlite] Command line client and Tcl interface behaves differently?

2010-11-20 Thread Fredrik Karlsson
On Sat, Nov 20, 2010 at 2:43 PM, Richard Hipp d...@sqlite.org wrote: On Sat, Nov 20, 2010 at 8:25 AM, Fredrik Karlsson dargo...@gmail.comwrote: Dear list, I am having a silly problem, and need your expertise. I just want to initiate a SQLite database using a schema file in Tcl, but I just

[sqlite] SQLite really SLOW on Solaris?

2010-11-20 Thread Lynton Grice
Hi there, I compiled SQLite on Debain (VM) first using the following: /usr/local/bin/gcc -c -fPIC sqlite3.c /usr/local/bin/gcc -shared -o libsqlite3.so sqlite3.o And then I created my own shared lib using SQLite and when I use the lib on Debian it is SUPER FAST. Then I installed

Re: [sqlite] Strange Corruption

2010-11-20 Thread Pirmin Walthert
No, this is definitely not the reason in my case as I can reproduce this issue on every 3.7.2/3.7.3 machine I've tested after copying the database file (and only the database file) to these machines. Am 15.11.2010 15:41, schrieb Kirk Clemons: Not sure if it helps but I would see this quite

Re: [sqlite] How to disable and enable constraints in SQLite ?

2010-11-20 Thread Roger Binns
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 11/19/2010 05:52 AM, Andreas Mucha wrote: i have to copy data from some database into an SQLite database. The fasted way for me would be to copy simply all tables. To do so i have to disable all SQLite - constraints, copy data and finally

Re: [sqlite] How to disable and enable constraints in SQLite ?

2010-11-20 Thread Chris Wolf
Roger, I tried building your APSW wrapper. It built fine, but running python setup.py test failed: ERROR: Verify VFS functionality -- Traceback (most recent call last): File /Users/cwolf/src/apsw-3.6.23.1-r1/tests.py, line

Re: [sqlite] Command line client and Tcl interface behaves differently?

2010-11-20 Thread Fredrik Karlsson
Hi, Sorry, never mind this post. I haven't found the problem actually yet, but a bare minimum example fed directly to the interpreter through the command line works correctly: % package require sqlite3 3.7.2 % set inf [open 1_schema.sql r] file6 % set sql [read $inf] [... the contents of the

Re: [sqlite] How to disable and enable constraints in SQLite ?

2010-11-20 Thread Roger Binns
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 11/20/2010 08:33 AM, Chris Wolf wrote: I tried building your APSW wrapper. It built fine, but running python setup.py test failed: ERROR: Verify VFS functionality --

Re: [sqlite] SQLite really SLOW on Solaris?

2010-11-20 Thread Roger Binns
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 11/20/2010 07:12 AM, Lynton Grice wrote: On Debian it processes a couple hundred messages per second, on Solaris using the SAME code it does like ONE message per second. One possible cause is the busy handler but this only applies if you have

Re: [sqlite] joining two sequences?

2010-11-20 Thread Jim Morris
Slightly better version: select distinct f1 .key as foo_key, b1.key as bar_key from bar b1 inner join foo f1 on f1 .value = b1.value where not exists ( -- Values for a particular key in foo select f3.value from foo f3 WHERE f3.key= f1.key union -- Values for a particular key in bar select

Re: [sqlite] SQLite really SLOW on Solaris?

2010-11-20 Thread Lynton Grice
Hi Roger, Many thanks for your feedback, much appreciated ;-) But why would that happen on Solaris and not Debian? Also, how would I pass the -D flags? Do I do that when I compile SQLite? Thanks again Lynton -Original Message- From: sqlite-users-boun...@sqlite.org

Re: [sqlite] SQLite really SLOW on Solaris?

2010-11-20 Thread Eric Smith
Lynton Grice wrote: Many thanks for your feedback, much appreciated ;-) But why would that happen on Solaris and not Debian? Did you try it on real OSs not VMs? Are you sure the host OS is giving the same compute disk slices to the VMs? Any other differences in those mappings? Are the

Re: [sqlite] page cache vs OS cache

2010-11-20 Thread Pavel Ivanov
I'd say the performance of a local in-process cache can be comparable with performance of OS cache only in one case: if your process is the only process in the system and no other files are read from disk. In all other (common) cases OS caches much larger set of data than is used by SQLite and

Re: [sqlite] SQLite really SLOW on Solaris?

2010-11-20 Thread Lynton Grice
Hi Eric, I will be trying it on real machines next week but for now I have one Debian and one Solaris VM on my laptop, each allocated the same memory etc I will try profiling what is really going on and will let you know, but I hope it is just a VM thing Thanks ;-) Lynton -Original