Hi Joe,

Your input is valuable. I will increase the pg size to 4KB and check.
We just have a set of tables which is to be read on startup.No complex Query is 
involved.
I find Sqlite to be most powerful given the size and complexity it handles.

I use the following apis to create the 

int ret = sqlite3_open(":memory:",&m_sqliteDb1);
also use for all temp tables,
pragma PRAGMA temp_store = MEMORY

PLs let me know if this is correct.


regrads
ragha
******************************************************************************************
 This email and its attachments contain confidential information from HUAWEI, 
which is intended only for the person or entity whose address is listed above. 
Any use of the information contained herein in any way (including, but not 
limited to, total or partial disclosure, reproduction, or dissemination) by 
persons other than the intended recipient(s) is prohibited. If you receive this 
e-mail in error, please notify the sender by phone or email immediately and 
delete it!
 
*****************************************************************************************

----- Original Message -----
From: Joe Wilson <[EMAIL PROTECTED]>
Date: Tuesday, June 26, 2007 10:58 pm
Subject: Re: [sqlite] In Mem Query Performance

> --- RaghavendraK 70574 <[EMAIL PROTECTED]> wrote:
> > Thanks for the suggestion. But with that performance went down 
> by 25% further.
> > Pls suggest an alternative. Mr DRH says it is possible we can 
> reach up to a million,if there is
> > a way pls notify.
> ...
> > We are using Sqlite in "in Memory Mode" and we have around 200 
> tables.> Each table has 10 columns of type text.
> > Each table has around 10000 records each column has around 
> 128bytes data.
> > Select performance is around 2000records/sec. Pls suggest if 
> there is a way
> > to improve further.
> > 
> > Table structure,Query style is as below,
> > 
> > create table test1 ...200
> > (
> >   key0 text,
> >   key1 text,
> >   key2 text,
> >   key3 text,
> >   key4 text,
> >   nonKey0 text,
> >   nonKey1 text,
> >   nonKey2 text,
> >   nonKey3 text,
> >   nonKey4 text,
> >   primary key(key0,key1,key2,key3,key4,key5)
> > );
> > 
> >   Query Used......
> > 
> >  SELECT * FROM TABLE136 WHERE
> > 
> key0='kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk> 
> kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk490' AND
> > 
> key1='kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk> 
> kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk491' AND
> > 
> key2='kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk> 
> kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk492' AND
> > 
> key3='kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk> 
> kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk493' AND
> > 
> key4='kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk> 
> kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk494'
> 
> If your tables have 10 columns of 128 bytes each, then each table 
> row is 
> over 1280 bytes, which exceeds a memory page size (1024), so 
> overflow 
> pages are used.  You might try a file-based database with a bigger 
> page_size,say 8192.
> 
> Judging by you example queries, your keys vary only after the 
> 120th byte
> or so. That may play a role in the lack of speed. Try putting the 
> differentiating characters first in the key strings.
> 
> Are your slow query really only looking at a single table, or do 
> they do
> a multiple table joins?
> 
> How do you create your memory database?
> Maybe you're not making a memory database as you think you are.
> 
> 
> 
>       
> ____________________________________________________________________________________
> Be a better Globetrotter. Get better travel answers from someone 
> who knows. Yahoo! Answers - Check it out.
> http://answers.yahoo.com/dir/?link=list&sid=396545469
> 
> -------------------------------------------------------------------
> ----------
> To unsubscribe, send email to [EMAIL PROTECTED]
> -------------------------------------------------------------------
> ----------
> 
> 

-----------------------------------------------------------------------------
To unsubscribe, send email to [EMAIL PROTECTED]
-----------------------------------------------------------------------------

Reply via email to