Re: [sqlite] beat 120,000 inserts/sec

2005-04-08 Thread Jeremy Hinegardner
On Fri, Apr 08, 2005 at 11:01:02PM -0400, Al Danial wrote: [...] > What kind of insert performance do you see on your machine? If it > is substantially better than 120 kinserts/s what kind of hardware > do you have? I'm especially interested in how much faster the > code runs on systems with

Re: [sqlite] beat 120,000 inserts/sec

2005-04-08 Thread Andy Lutomirski
Al Danial wrote: The attached C program measures insert performance for populating a table with an integer and three random floating point values with user defined transaction size. Usage is: ./sqlite_insert All of these are on Gentoo, Athlon 64 3200+, running 64 bit. Writing to /tmp,

Re: [sqlite] beat 120,000 inserts/sec

2005-04-08 Thread Dan Nuffer
Al Danial wrote: > What kind of insert performance do you see on your machine? If it > is substantially better than 120 kinserts/s what kind of hardware > do you have? I'm especially interested in how much faster the > code runs on systems with multiple disks in a RAID 0 configuration. > Are

Re: [sqlite] beat 120,000 inserts/sec

2005-04-08 Thread Eric Bohlman
Al Danial wrote: A scientific application I work with has clumsy data retrieval options. I dumped the application's output--integer and floating point numbers--into an SQLite database and soon after began to enjoy the power of SQL to pull out interesting results. The main complaint for making the

Re: [sqlite] beat 120,000 inserts/sec

2005-04-08 Thread Dan Kennedy
Random thought: You might squeeze some more performance out by trying a couple different filesystems. i.e. if you're using ext3, try some different journaling options, or try ext2. --- Al Danial <[EMAIL PROTECTED]> wrote: > A scientific application I work with has clumsy data retrieval >

[sqlite] beat 120,000 inserts/sec

2005-04-08 Thread Al Danial
A scientific application I work with has clumsy data retrieval options. I dumped the application's output--integer and floating point numbers--into an SQLite database and soon after began to enjoy the power of SQL to pull out interesting results. The main complaint for making the transfer to

Re: [sqlite] create table question

2005-04-08 Thread Jay Sprenkle
> > > > select_stmt = db.execute("SELECT * FROM people") > > # use some, but not all of the rows in select_stmt > > create_stmt = db.execute("CREATE TABLE other (a,b)") # error: > > database table is locked > > > > Why does this happen? > > > > Anyway around

Re: [sqlite] create table question

2005-04-08 Thread Charles Mills
On Apr 8, 2005, at 9:27 AM, Robert Simpson wrote: Actually if you need to re-use the prepared statement, it's much more efficient to simply call sqlite_reset() on it instead of finalize. As long as the statement is not currently step()'ing and is in the reset state, the database will not be

Re: [sqlite] malformed 2.1 db

2005-04-08 Thread Kurt Welgehausen
> Unable to open database 1.db > now what? any suggestions? There's probably nothing you can do to fix the file. In the past, you could corrupt a database by vacuuming it in one process and then doing an insert in another process. This has been fixed in V3; I don't know if the bug even existed

RE: [sqlite] create table question

2005-04-08 Thread Robert Simpson
Actually if you need to re-use the prepared statement, it's much more efficient to simply call sqlite_reset() on it instead of finalize. As long as the statement is not currently step()'ing and is in the reset state, the database will not be locked. Example: select_stmt = db.execute("SELECT *

Re: [sqlite] create table question

2005-04-08 Thread Paolo Vernazza
Charles Mills wrote: I am trying to create a table after creating a select statement which selects records from an existing table. Is this possible? I get a SQLITE_LOCKED / "database table is locked" error when I attempt this. In psuedo code the logic is as follows: select_stmt =

Re: [sqlite] create table question

2005-04-08 Thread Charles Mills
On Apr 8, 2005, at 2:35 AM, Paolo Vernazza wrote: Charles Mills wrote: I am trying to create a table after creating a select statement which selects records from an existing table. Is this possible? I get a SQLITE_LOCKED / "database table is locked" error when I attempt this. In psuedo code

RE: [sqlite] Re: Index not used with "between"

2005-04-08 Thread Griggs, Donald
Hi Cory, Regarding: Is there a reason [the sql command] BETWEEN can't use [an index]? Hmm... nobody has an answer? Or did my message get eaten by a spam filter :( I can't answer your question by providing you the reason, but it appears to be a fact that you will want to use separate

[sqlite] malformed 2.1 db

2005-04-08 Thread Mustafa TUFAN
Hi there, 1. i get the following error; c:\>sqlite.exe 1.db Unable to open database "1.db": database disk image is malformed so i can't execute pragma integrity_check. header: ** This file contains an SQLite 2.1 database ** 2. this is the corrupted file: 00: 2A 2A 20 54 68 69 73 20 ? 66

Re: [sqlite] SELECT (...) GROUP BY not returns!

2005-04-08 Thread Derrell . Lipman
Adam Dziendziel <[EMAIL PROTECTED]> writes: > SELECT COUNT(*) FROM drzewo_towar WHERE lft > 13 AND rgt < 14 GROUP BY towar > ... > the engine doesn't return the value (the above query should return 0). COUNT(*) returns NULL if there are no records selected. Change the query like this to

Re: [sqlite] Re: Index not used with "between"

2005-04-08 Thread Gerald Dachs
> Hmm... nobody has an answer? Or did my message get eaten by a spam filter > :( > > On Apr 4, 2005 8:02 PM, Cory Nelson <[EMAIL PROTECTED]> wrote: >> Using the following: >> >> create table t_history(time real, ...); >> create index i_time on t_history(time); >> select count(*) from t_history

[sqlite] SELECT (...) GROUP BY not returns!

2005-04-08 Thread Adam Dziendziel
When I execute: SELECT COUNT(*) FROM drzewo_towar WHERE lft > 13 AND rgt < 14 GROUP BY towar on the table: CREATE TABLE drzewo_towar ( id INTEGER PRIMARY KEY, nazwa TINYTEXT, towar INTEGER, lft INTEGER, rgt INTEGER, dpt INTEGER ); INSERT INTO

[sqlite] Re: Index not used with "between"

2005-04-08 Thread Cory Nelson
Hmm... nobody has an answer? Or did my message get eaten by a spam filter :( On Apr 4, 2005 8:02 PM, Cory Nelson <[EMAIL PROTECTED]> wrote: > Using the following: > > create table t_history(time real, ...); > create index i_time on t_history(time); > select count(*) from t_history where time

Re: Re: [sqlite] How do I efficiently copy tables to another db within dll (sqlite3+)

2005-04-08 Thread Jay
> Thanks much - one more question though... > > I'm attempting to copy data from an in memory database to > another db (file or otherwise). Is it possible to attach an > existing in-memory database to another existing db connection? > (attach database :MEMORY: would just seem to create another

[sqlite] Callback when content has changed

2005-04-08 Thread F.W.A. van Leeuwen
Is it possible for a C application to get a callback as soon as a database's content has changed? Best regards, Frank.

Re: [sqlite] create table question

2005-04-08 Thread Paolo Vernazza
Charles Mills wrote: I am trying to create a table after creating a select statement which selects records from an existing table. Is this possible? I get a SQLITE_LOCKED / "database table is locked" error when I attempt this. In psuedo code the logic is as follows: select_stmt =