Re: [sqlite] SQLite performance for 10 Million Records

2006-06-26 Thread Dennis Cote
Joe Wilson wrote: I think some other factor is at play here. SQLite 2.x's memory databases are still twice as fast at batch inserts than either 3.x's disk-based databases or 2.x's disk-based databases when the DB size is less than physical machine memory. Joe, Yes there is another

Re: [sqlite] SQLite performance for 10 Million Records

2006-06-26 Thread Martin Jenkins
Dennis Cote wrote: Joe Wilson wrote: I think some other factor is at play here. Yes there is another factor at work here. [...] I suspect there are optimizations that could be made to the memory I/O routines to speed them up, they should at least be able to run slightly faster than file

Re: [sqlite] SQLite performance for 10 Million Records

2006-06-26 Thread Manzoor Ilahi Tamimy
Hi, I am really really thankful to all the members of this group. The Discussion here was really very helpful for me and also for the others. I was not as much experienced as the other members who took part in this dicussion, but i worked hard ad spent a lot of time to find out why i am

Re: [sqlite] SQLite performance for 10 Million Records

2006-06-26 Thread Joe Wilson
--- Martin Jenkins [EMAIL PROTECTED] wrote: For :memory: databases, long periods were observed where the VM size crept up but I/O write bytes did not, followed by periods where I/O bytes increased. If you use PRAGMA temp_store=MEMORY with your :memory: database you will have no I/O

Re: [sqlite] SQLite performance for 10 Million Records

2006-06-26 Thread Joe Wilson
I think some other factor is at play here. SQLite 2.x's memory databases are still twice as fast at batch inserts than either 3.x's disk-based databases or 2.x's disk-based databases when the DB size is less than physical machine memory. I did some experimentation with an SQLite 2.8.17

Re: [sqlite] SQLite performance for 10 Million Records

2006-06-26 Thread Martin Jenkins
Joe Wilson wrote: --- Martin Jenkins [EMAIL PROTECTED] wrote: For :memory: databases, long periods were observed where the VM size crept up but I/O write bytes did not, followed by periods where I/O bytes increased. If you use PRAGMA temp_store=MEMORY with your :memory: database you will

Re: [sqlite] SQLite performance for 10 Million Records

2006-06-23 Thread Nikki Locke
Manzoor Ilahi Tamimy wrote: sqlite3_exec(db, create table t (a integer, b float, c text,d integer, e float, f text, g float, h text), NULL, NULL, NULL); sqlite3_exec(db, begin transaction, NULL, NULL, NULL); sqlite3_prepare(db, insert into t values (?, ?, ?, ?, ?, ?, ? ,

Re: [sqlite] SQLite performance for 10 Million Records

2006-06-23 Thread Dennis Cote
Manzoor Ilahi Tamimy wrote: I have tested my Code with the following PRAGMA and still not getting any change in time. //-- sqlite3_exec(db, PRAGMA temp_store=2, NULL, NULL, NULL); sqlite3_exec(db, PRAGMA synchronous=0, NULL, NULL,

RE: [sqlite] SQLite performance for 10 Million Records

2006-06-23 Thread CARTER-HITCHIN, David, GBM
This is a modified version of the test code I posted to show that there was a small but definite SLOWDOWN when using :memory: databases compared to a database in a file on disk. It seems strange, but it is true. Use a disk file for best speed. If true, this is crazy. Memory is

Re: [sqlite] SQLite performance for 10 Million Records

2006-06-23 Thread Eduardo
At 03:09 23/06/2006, you wrote: #include stdafx.h samples, t, samples / t); getch(); //* Here you should create index for table t. In your previous example, for hvh itm // Select Time check

Re: [sqlite] SQLite performance for 10 Million Records

2006-06-23 Thread John Stanton
Cacheing will drive you crazy. CARTER-HITCHIN, David, GBM wrote: This is a modified version of the test code I posted to show that there was a small but definite SLOWDOWN when using :memory: databases compared to a database in a file on disk. It seems strange, but it is true. Use a disk

Re: [sqlite] SQLite performance for 10 Million Records

2006-06-23 Thread Dennis Cote
John Stanton wrote: Cacheing will drive you crazy. Very well put. Most of SQLite's disk I/O is actually going to the memory used for the operating system's disk cache, not directly to the disk. Hence its speed is not much different when using a disk based database than a memory based

Re: [sqlite] SQLite performance for 10 Million Records

2006-06-23 Thread Eric Scouten
On 23 Jun 2006, at 14:16, Dennis Cote wrote: John Stanton wrote: Cacheing will drive you crazy. Very well put. Most of SQLite's disk I/O is actually going to the memory used for the operating system's disk cache, not directly to the disk. Hence its speed is not much different when

Re: [sqlite] SQLite performance for 10 Million Records

2006-06-23 Thread Joe Wilson
--- Manzoor Ilahi Tamimy [EMAIL PROTECTED] wrote: DISK MODE 3000 000 INSERTS 31 Seconds 96774 INSERTS / Sec SELECT * from t 5 Seconds. MEMORY MODE 3000 000 INSERTS 53 Seconds 56604 INSERTS / Sec SELECT * from t 5 Seconds. Can I reduce the TIME of DISK mode or this is the

Re: [sqlite] SQLite performance for 10 Million Records

2006-06-23 Thread Joe Wilson
On 23 Jun 2006, at 14:16, Dennis Cote wrote: Most of SQLite's disk I/O is actually going to the memory used for the operating system's disk cache, not directly to the disk. Hence its speed is not much different when using a disk based database than a memory based database. I'm still

Re: [sqlite] SQLite performance for 10 Million Records

2006-06-22 Thread Manzoor Ilahi Tamimy
I have tested my Code with the following PRAGMA and still not getting any change in time. //-- sqlite3_exec(db, PRAGMA temp_store=2, NULL, NULL, NULL); sqlite3_exec(db, PRAGMA synchronous=0, NULL, NULL, NULL); sqlite3_exec(db, PRAGMA

Re: [sqlite] SQLite performance for 10 Million Records

2006-06-20 Thread Derrell . Lipman
Manzoor Ilahi Tamimy [EMAIL PROTECTED] writes: Here Is The Schema For these Tables. CREATE TABLE HVH ( Field1 VARCHAR(8),IDC VARCHAR(4), Field3 VARCHAR(2),Field4 VARCHAR(4), Field5 VARCHAR(7),Field6 VARCHAR(8), Field7 VARCHAR(1),Field8 FLOAT); CREATE TABLE ITM( IDC

Re: [sqlite] SQLite performance for 10 Million Records

2006-06-20 Thread Eduardo
At 03:30 20/06/2006, you wrote: Here Is The Schema For these Tables. CREATE TABLE HVH ( Field1 VARCHAR(8), IDC VARCHAR(4), Field3 VARCHAR(2), Field4 VARCHAR(4), Field5 VARCHAR(7), Field6 VARCHAR(8), Field7 VARCHAR(1), Field8 FLOAT); CREATE TABLE ITM( IDC VARCHAR(4),

Re: [sqlite] SQLite performance for 10 Million Records

2006-06-20 Thread Dennis Cote
Manzoor Ilahi Tamimy wrote: Here Is The Schema For these Tables. CREATE TABLE HVH ( Field1 VARCHAR(8), IDC VARCHAR(4), Field3 VARCHAR(2), Field4 VARCHAR(4), Field5 VARCHAR(7), Field6 VARCHAR(8), Field7 VARCHAR(1), Field8 FLOAT); CREATE TABLE ITM( IDC VARCHAR(4),ITEMNAME

[sqlite] SQLite performance for 10 Million Records

2006-06-19 Thread Manzoor Ilahi Tamimy
Hello All, We are Using SQLite for one of our project. The Database Size is more than 500 MB. It contain one table and about 10 million Records. We are facing Problem in the select with single Join. The join is between a big table and a small table. The small table contain records not more

Re: [sqlite] SQLite performance for 10 Million Records

2006-06-19 Thread Bill King
Manzoor Ilahi Tamimy wrote: Hello All, We are Using SQLite for one of our project. The Database Size is more than 500 MB. It contain one table and about 10 million Records. We are facing Problem in the select with single Join. The join is between a big table and a small table. The small

Re: [sqlite] SQLite performance for 10 Million Records

2006-06-19 Thread Micha Bieber
Monday, June 19, 2006, 07:37:22, Manzoor Ilahi Tamimy wrote: The Database Size is more than 500 MB. It contain one table and about 10 million Records. I had problems with even more records (roughly 25 million, 1GB of data) and I've stopped efforts to do it in pure sqlite in the end, also

Re: [sqlite] SQLite performance for 10 Million Records

2006-06-19 Thread Derrell . Lipman
Bill King [EMAIL PROTECTED] writes: Manzoor Ilahi Tamimy wrote: We are Using SQLite for one of our project. The Database Size is more than 500 MB. It contain one table and about 10 million Records. Err, for that size, I'd recommend going something heavier, like firebird. This is not

Re: [sqlite] SQLite performance for 10 Million Records

2006-06-19 Thread Manzoor Ilahi Tamimy
Dear ALL, I am really thankful to Bill King, Micha Bieber , Derrell for your valuable suggestions. I was really confused that which way should I follow now, because I was sure that SQLite will work much better. when I got the suggestion about Firebird then again I went to the comparison page

Re: [sqlite] SQLite performance for 10 Million Records

2006-06-19 Thread Brett Wilson
count(*) is pretty slow in sqlite because it basically does select * and then counts the results. This means it's looking through your whole big file. You can come up with some tricks like keeping a separate count up-to-date with triggers. There have been some old threads on optimizing count

Re: [sqlite] SQLite performance for 10 Million Records

2006-06-19 Thread Manzoor Ilahi Tamimy
Here Is The Schema For these Tables. CREATE TABLE HVH ( Field1 VARCHAR(8), IDC VARCHAR(4), Field3 VARCHAR(2), Field4 VARCHAR(4), Field5 VARCHAR(7), Field6 VARCHAR(8), Field7 VARCHAR(1), Field8 FLOAT); CREATE TABLE ITM( IDC VARCHAR(4),ITEMNAME VARCHAR(20),