The latest version of SQLite from CVS should give you comparable :memory: 
insert timings to that of a file-based database assuming you have enough
RAM. Well, no more than 4% slower, anyway.

Take a look at this bug ticket http://www.sqlite.org/cvstrac/tktview?tn=1790
for details and how to have :memory: DB slightly outperform a file-based 
database using the 3.3.5 code release with N_PG_HASH=32768 and 
SQLITE_DEFAULT_PAGE_SIZE=1024.

--- Manzoor Ilahi Tamimy <[EMAIL PROTECTED]> wrote:

> DEAR All ,
>    
>    I want to use SQLite for our project, the main thing is that the 
>    database contains millions of Records. So for the faster 
>  operations   on the db I want to use the SQLite as in-memory database.
>  
>    I have compared the results of SQLite as Disk db and as Memory db 
>    but I am not getting much difference. I am surprised that there 
>   must  be some difference between memory mode and disk mode.
>  
>    Tests were run on 2.4GHz Sempron with 1GB of RAM and running 
>   Windows  XP + SP2 with all updates applied. Test 20 : 1000000 
>   INSERTs CREATE  TABLE t1(a INTEGER, b INTEGER, c VARCHAR(100)); 
>   INSERT INTO t1  VALUES(1,13153,'thirteen thousand one hundred fifty 
>   three');
>    ----------------------------------------------------------------
>    In Memory 37.51 Sec 
>    DISK BASED 39.760000 Sec 
>    Disk Space consumed 61.6 MB 
>    ----------------------------------------------------------------
>  
>    Test 21`: 3000000 INSERTs
>    In Memory 141.79 Sec 
>    DISK BASED         111.906000 Sec 
>    Disk Space consumed 185 MB
>    ----------------------------------------------------------------
>  
>    Test 22: 5000000 INSERTs
>  
>    In Memory 279.42 Sec
>    DISK BASED         201.266000 Sec 
>    Disk Space consumed 308 MB
>    Test 23: 10000000 INSERTs
>    ----------------------------------------------------------------
>  
>    In Memory 784.797000 Sec 
>    DISK BASED         399.846000 Sec
>    Disk Space consumed 617 MB
>    ----------------------------------------------------------------
>  
>    I am testing it in the following way
>    ----------------------------------------------------------------
>  
>    dwStart = GetTickCount();
>    db.execDML("begin transaction;");
>    db.execDML("CREATE TABLE t1(a INTEGER, b INTEGER, c VARCHAR(100))
>  ;") ; for( int i=1;i<=10000000;i++) db.execDML("INSERT INTO t1 
>  VALUES(1, 298361,'two hundred ninety eight  thousand three hundred')
>  ");  db.execDML("commit Transaction") ;  dwStop = GetTickCount();
>  
>    ----------------------------------------------------------------
>    I think I am missing something or some necessary parameters. I 
>   spent  a lot of time to find out the problem. Please Guide me. I 
>   will be  really thankful.
>  
>    Regards,
>  
>    MANZOOR ILAHI
> --
> COMSATS Institute of Information Technology (http://www.ciit.edu.pk)
> 
> 


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

Reply via email to