RE: [sqlite] Checking out the performance of sqlite3

2007-11-21 Thread Kalyani Tummala
Kirthana,
I have done memory and performance analysis on windows, linux and other
embedded platforms like Davinci,DM320,PNX0103 etc.,

With the same parameters memory on all the platforms is same but we
cannot take performance numbers(time) on PCs(win32,linux) because they
don't reflect the actual numbers.

How do you want to do this analysis?

-Original Message-
From: kirrthana M [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, November 21, 2007 2:55 PM
To: sqlite-users@sqlite.org
Subject: [sqlite] Checking out the performance of sqlite3

Hi all,
 I just want to compare the performance of sqlite on various os and in
embedded,
Just want to know the time it takes to read and write data,can anybody
give
me a suggestion of how to do this.


Regards
Kirrthana

The information contained in this electronic message and any attachments
to this message are intended for the exclusive use of the addressee(s)
and may contain proprietary, confidential or privileged information. If
you are not the intended recipient, you should not disseminate,
distribute or copy this e-mail. Please notify the sender immediately and
destroy all copies of this message and any attachments contained in it.

Contact your Administrator for further information.

**
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
[EMAIL PROTECTED]
**


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



RE: [sqlite] UI question

2007-08-02 Thread Kalyani Tummala
Simply put a ; there..it will finish the command and says invalid sqlite
command and comes back to the commad mode again.

-Original Message-
From: Griggs, Donald [mailto:[EMAIL PROTECTED] 
Sent: Thursday, August 02, 2007 8:04 PM
To: sqlite-users@sqlite.org
Subject: RE: [sqlite] UI question

 

-Original Message-
From: Scott Derrick [mailto:[EMAIL PROTECTED] 
Sent: Thursday, August 02, 2007 10:22 AM
To: sqlite-users@sqlite.org
Subject: [sqlite] UI question

This is probably a stupid question but has frustrated me a couple of
times.

When using the command line interface sqlite3, a couple of times I have
forgotten to use the "." before a command.  After that I get a "...>" 
prompt  that I can't seem to escape from and accepts no commands?  My
only choice is to shut down that terminal and start a new one..

There must be an easy  way to  get back to the command mode? And what is
the "...>"  mode?

Scott

=
Hi Scott,

The command line utility thinks you are continuing a long SQL command.

A semicolon (;) will terminate it, put you back to command mode, and
allow you to .quit


-
To unsubscribe, send email to [EMAIL PROTECTED]

-


**
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
[EMAIL PROTECTED]
**


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



RE: [sqlite] sql query required

2007-07-29 Thread Kalyani Tummala
Hi Phanisekhar

Try this query..

Select yearofbirth, count(yearofbirth) from  group by
yearofbirth;


-Original Message-
From: B V, Phanisekhar [mailto:[EMAIL PROTECTED] 
Sent: Friday, July 27, 2007 8:31 PM
To: sqlite-users@sqlite.org
Subject: [sqlite] sql query required

Suppose I have a table:

 

Create table "yearofbirth INTEGER, Name string"

 

What will be the query to identify how many people were born in
different years? The output should contain all the years that are
present in the table and the total count corresponding to each entry.

 

Eg:

 

1901  rahul

1902  deepak

1901  joy

1945  deep

1953  preeti

1945  saum

 

The output should be

 

1901  2

1902  1

1945  2

1953  1

 

One can use GROUP BY.

 

Regards,

Phanisekhar


**
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
[EMAIL PROTECTED]
**


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



[sqlite] Integrity Check error

2007-06-06 Thread Kalyani Tummala
I was trying to insert records into sqlite database. I observed that
there was a mismatch in the data retrieved.

I went ahead checking for the integrity ( with PRAGMA integrity_check )

I got the following warnings:

 

rowid 1 missing from index album_title_idx

rowid 1 missing from index genre_album_title_idx

rowid 36 missing from index genre_album_title_idx

rowid 36 missing from index genre_artist_title_idx

 

Can someone point out what might be going wrong?. When does the
integrity fail with these errors?.

 

Thanks in advance

Kalyani


**
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
[EMAIL PROTECTED]
**



RE: [sqlite] How to restrict the peak heap usage during multiple inserts and updates?

2007-05-30 Thread Kalyani Tummala
Hi Joe,
Yes, SDRAM is normal volatile RAM. Instead of BEGIN ... COMMIT, I have
opened database before insert statement and closed db after that, with
2500 records already stored in the database, temp_store set to 0(file
always), sqlite is taking 48K heap to open the database, 55K for first 5
inserts and increases for every other insert and goes to 68K for next 5
inserts. With temp_store set to 3(memory always), it is reaching 78K. 

Increasing PAGE size increases STACK consumption, which is again a
problem with little main memory. 

So, I think, as the database grows, the initial heap required by an
insert or update statement grows. Can we have control over max heap
usage by sqlite? Did anyone experience before this growth in heap usage?
Are my numbers correct? This is going to be a bottleneck for my
application. 

Thank you
Kalyani

-Original Message-
From: Joe Wilson [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, May 29, 2007 9:40 PM
To: sqlite-users@sqlite.org
Subject: RE: [sqlite] How to restrict the peak heap usage during
multiple inserts and updates?

The default is auto-commit, so unless you've opened an explicit
transaction
with BEGIN and do a number of inserts, the COMMIT suggestion is not
useful
in reducing memory footprint.

(apologies in advance if this is obvious...)
SDRAM is the normal volatile RAM, right?
You know that temp_store is competing with sqlite for your RAM.
If you point your temp_store to "disk" to use non-volatile storage 
(disk or flash) then you'd have more RAM available for sqlite. 
Or do you lack such non-volatile storage?

You can run the tests on Windows by installing either Cygwin or
MinGW/MSYS, installing Tcl 8.4, running configure, and then running
"make test".
You can change the generated Makefile to define various sqlite
compile-time
flags for memory debugging. Just scan the ifdef's in the source code for
ideas what to enable. It's much easier to do this under Linux than under

Windows, in my opinion.

--- Kalyani Tummala <[EMAIL PROTECTED]> wrote:
> My temp_store is SDRAM. Thanks for your suggestion of using COMMIT. I
> have not used it. Any other pointers?
> 
> Best Regards
> Kalyani
> 
> 
> -Original Message-
> From: Joe Wilson [mailto:[EMAIL PROTECTED] 
> Sent: Tuesday, May 29, 2007 10:27 AM
> To: sqlite-users@sqlite.org
> Subject: Re: [sqlite] How to restrict the peak heap usage during
> multiple inserts and updates?
> 
> --- Joe Wilson <[EMAIL PROTECTED]> wrote:
> > > I am working at porting sqlite ( ver 3.3.8 ) on an embedded device
> with
> > > extremely low main memory.
> > > 
> > > I tried running select queries on the tables( with about 2k
records
> each
> > > having about 5 strings) and they do well within 20kB of runtime
heap
> > > usage.
> > > 
> > > But, when I try new insertions, the heap usage grows tremendously
> (about
> > > 70 kB at peak).
> > 
> > Perhaps preparing the statements (sqlite3_prepare) might decrease
RAM 
> > use somewhat.
> > 
> > Can you post an example of your schema and these insert statements?
> 
> Is your temp_store in memory or flash ram or other?
> 
> Another thought... are you performing a COMMIT after each INSERT?
> (or at least every X inserts, where X<100)?
> It might help to reduce memory (at the cost of reduced speed).



   

Get the free Yahoo! toolbar and rest assured with the added
security of spyware protection.
http://new.toolbar.yahoo.com/toolbar/features/norton/index.php


-
To unsubscribe, send email to [EMAIL PROTECTED]

-


**
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
[EMAIL PROTECTED]
**


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



RE: [sqlite] How to restrict the peak heap usage during multiple inserts and updates?

2007-05-30 Thread Kalyani Tummala
Hi John,

My main memory is very limited but I have large disk to keep the
database. I need to serialize the data when the device is in switch off
mode or in a different application mode where database is not required.
I need to take care of power failure, data corruption etc.,

I consider your advice but how extensible and flexible it is for future
modifications? 

Regards
Kalyani

-Original Message-
From: John Stanton [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, May 29, 2007 9:25 PM
To: sqlite-users@sqlite.org
Subject: Re: [sqlite] How to restrict the peak heap usage during
multiple inserts and updates?

In your case we would not use Sqlite and instead use a much simpler 
storage method.  Since your storage appears to be RAM resident that 
approach is indicated a fortiori.

We have had success with using storage based on AVL trees.  It is very 
fast and remains so despite repeated insertions and deletions.  The code

footprint is tiny (10K) and there is no heap usage so memory leakage can

never be a problem.  You do not have SQL in that environment but it 
would appear that you are not using it anyway.  Since your data is 
memory resident ACID compliance and logging are not an issue.

Even with quite detailed data manipulation you would be hard pressed to 
have a footprint greater than 30K.  You could cut that down by defining 
code like VDBE with a high information density and using a simple engine

to interpret that metacode.  We have successfully used that approach at 
times.

Kalyani Tummala wrote:
> Hi John,
> I could not understand your query properly. Let me tell you my
> application scenario. 
> 
> I am planning to use sqlite as a database for storing and retrieving
> media data of about 5-10k records in a device whose main memory is
> extremely small. A sequence of insert statements increasing the heap
> usage to nearly 70K(almost saturating point) which is crashing my
> application. I want to restrict this to 30K. 
> 
> I tried closing database and reopen after some inserts but of no use. 
> 
> I have observed that, when I open the database with about 1K to 2K
> records in it, inserts and updates take more heap and also gradually
> increase than a a database with less than 1k records in it. 
> 
> My objective is to reduce the peak heap usage during inserts, updates
> and also deletes with little or no performance degradation.
> 
> Please suggest me if I can do anything to do so.
> 
> Thank you in advance
> Kalyani
> 
> 
> 
>   
> 
> -Original Message-
> From: John Stanton [mailto:[EMAIL PROTECTED] 
> Sent: Tuesday, May 29, 2007 6:51 PM
> To: sqlite-users@sqlite.org
> Subject: Re: [sqlite] How to restrict the peak heap usage during
> multiple inserts and updates?
> 
> Since you are only using part of Sqlite have you considered using a
much
> 
> smaller footprint storage system which only implements the functions
you
> 
> are using?
> 
> Kalyani Tummala wrote:
> 
>>Hi joe,
>>
>>Thanks for your response. 
>>
>>In order to reduce the footprint size, I have bypassed parser
> 
> completely
> 
>>and using byte codes directly as my schema and queries are almost
>>compile time fixed. Hence I am not using sqlite3_prepare(). 
>> 
>>The following is the schema and inserts I am using. 
>>CREATE TABLE OBJECT(
>>
>>PUOI  INTEGER  PRIMARY KEY,
>>Storage_IdINTEGER,
>>Object_Format INTEGER, 
>>Protection_Status INTEGER,
>>Object_Size   INTEGER,
>>Parent_Object INTEGER,
>>Non_ConsumableINTEGER,
>>Object_file_name  TEXT,
>>Name  TEXT,
>>File_Path TEXT
>>);
>>
>>CREATE TABLE AUDIO(
>>
>>PUOI  INTEGER PRIMARY KEY,
>>Use_Count INTEGER,
>>Audio_Bit_RateINTEGER,
>>Sample_Rate   INTEGER,
>>Audio_Codec_Type  INTEGER,
>>Number_of_ChannelsINTEGER,
>>Track INTEGER,
>>ArtistTEXT,
>>Title TEXT,
>>Genre TEXT,
>>Album_NameTEXT,
>>File_Path TEXT
>>);
>>
>>INSERT INTO OBJECT VALUES (
>> 7, 65537, 12297, 0,
>> 475805, 6, 0, 
>> 'ANJANEYASTOTRAM.mp3', NULL,
>>'C:\\MTPSim\\Store0\\Music\\Artist\\Album\\ANJANEYASTOTRAM.mp3'
>>);
>>
>>
>>INSERT INTO AUDIO VALUES (
>> 7, 6, 144100, 0,
>> 0, 0, 6, 
>> NULL, NULL, NULL, NULL,
>>'C:\\MTPSim\\Store0\\Music\\Artist\\Album\\ANJANEYASTOTRAM.mp3'
>>);
>>
>>INSERT INTO OBJECT VALUES (
>> 8, 65537, 12297, 0,
>> 387406, 6, 0, 
>> 'BHADRAM.mp3', NULL

RE: [sqlite] How to restrict the peak heap usage during multiple inserts and updates?

2007-05-29 Thread Kalyani Tummala
Hi John,
I could not understand your query properly. Let me tell you my
application scenario. 

I am planning to use sqlite as a database for storing and retrieving
media data of about 5-10k records in a device whose main memory is
extremely small. A sequence of insert statements increasing the heap
usage to nearly 70K(almost saturating point) which is crashing my
application. I want to restrict this to 30K. 

I tried closing database and reopen after some inserts but of no use. 

I have observed that, when I open the database with about 1K to 2K
records in it, inserts and updates take more heap and also gradually
increase than a a database with less than 1k records in it. 

My objective is to reduce the peak heap usage during inserts, updates
and also deletes with little or no performance degradation.

Please suggest me if I can do anything to do so.

Thank you in advance
Kalyani



  

-Original Message-
From: John Stanton [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, May 29, 2007 6:51 PM
To: sqlite-users@sqlite.org
Subject: Re: [sqlite] How to restrict the peak heap usage during
multiple inserts and updates?

Since you are only using part of Sqlite have you considered using a much

smaller footprint storage system which only implements the functions you

are using?

Kalyani Tummala wrote:
> Hi joe,
> 
> Thanks for your response. 
> 
> In order to reduce the footprint size, I have bypassed parser
completely
> and using byte codes directly as my schema and queries are almost
> compile time fixed. Hence I am not using sqlite3_prepare(). 
>  
> The following is the schema and inserts I am using. 
> CREATE TABLE OBJECT(
> 
> PUOI  INTEGER  PRIMARY KEY,
> Storage_IdINTEGER,
> Object_Format INTEGER, 
> Protection_Status INTEGER,
> Object_Size   INTEGER,
> Parent_Object INTEGER,
> Non_ConsumableINTEGER,
> Object_file_name  TEXT,
> Name  TEXT,
> File_Path TEXT
> );
> 
> CREATE TABLE AUDIO(
> 
> PUOI  INTEGER PRIMARY KEY,
> Use_Count INTEGER,
> Audio_Bit_RateINTEGER,
> Sample_Rate   INTEGER,
> Audio_Codec_Type  INTEGER,
> Number_of_ChannelsINTEGER,
> Track INTEGER,
> ArtistTEXT,
> Title TEXT,
> Genre TEXT,
> Album_NameTEXT,
> File_Path TEXT
> );
> 
> INSERT INTO OBJECT VALUES (
>  7, 65537, 12297, 0,
>  475805, 6, 0, 
>  'ANJANEYASTOTRAM.mp3', NULL,
> 'C:\\MTPSim\\Store0\\Music\\Artist\\Album\\ANJANEYASTOTRAM.mp3'
> );
> 
> 
> INSERT INTO AUDIO VALUES (
>  7, 6, 144100, 0,
>  0, 0, 6, 
>  NULL, NULL, NULL, NULL,
> 'C:\\MTPSim\\Store0\\Music\\Artist\\Album\\ANJANEYASTOTRAM.mp3'
> );
> 
> INSERT INTO OBJECT VALUES (
>  8, 65537, 12297, 0,
>  387406, 6, 0, 
>  'BHADRAM.mp3', NULL,
> 'C:\\MTPSim\\Store0\\Music\\Artist\\Album\\BHADRAM.mp3'
> );
> 
> 
>  INSERT INTO AUDIO VALUES (
>  8, 6, 144100, 0,
>  0, 0, 6, 
>  NULL, NULL, NULL, NULL,
> 'C:\\MTPSim\\Store0\\Music\\Artist\\Album\\BHADRAM.mp3'
> );
> 
> 
> Warm regards
> Kalyani
> 
> -Original Message-
> From: Joe Wilson [mailto:[EMAIL PROTECTED] 
> Sent: Tuesday, May 29, 2007 9:42 AM
> To: sqlite-users@sqlite.org
> Subject: Re: [sqlite] How to restrict the peak heap usage during
> multiple inserts and updates?
> 
> 
>>I am working at porting sqlite ( ver 3.3.8 ) on an embedded device
> 
> with
> 
>>extremely low main memory.
>>
>>I tried running select queries on the tables( with about 2k records
> 
> each
> 
>>having about 5 strings) and they do well within 20kB of runtime heap
>>usage.
>>
>>But, when I try new insertions, the heap usage grows tremendously
> 
> (about
> 
>>70 kB at peak).
> 
> 
> Perhaps preparing the statements (sqlite3_prepare) might decrease RAM 
> use somewhat.
> 
> Can you post an example of your schema and these insert statements?
> 
> 
> 
>
>

> Choose the right car based on your needs.  Check out
Yahoo!
> Autos new Car Finder tool.
> http://autos.yahoo.com/carfinder/
> 
>

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

> -
> 
> 
> **
> This email and any files transmitted with

[sqlite] Memory and Performance Profiling of sqlite commands

2007-05-29 Thread Kalyani Tummala
Dear Group,
Is there any provision in the sqlite library for memory and performance
profiling of SQL commands. How can I use the test folder where tcl
script files are available for regression testing? How can I run those
scripts in Windows XP? 

Thanks in advance
Kalyani

**
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
[EMAIL PROTECTED]
**


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



RE: [sqlite] How to restrict the peak heap usage during multiple inserts and updates?

2007-05-28 Thread Kalyani Tummala

Thanks Joe,

My temp_store is SDRAM. Thanks for your suggestion of using COMMIT. I
have not used it. Any other pointers?

Best Regards
Kalyani


-Original Message-
From: Joe Wilson [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, May 29, 2007 10:27 AM
To: sqlite-users@sqlite.org
Subject: Re: [sqlite] How to restrict the peak heap usage during
multiple inserts and updates?

--- Joe Wilson <[EMAIL PROTECTED]> wrote:
> > I am working at porting sqlite ( ver 3.3.8 ) on an embedded device
with
> > extremely low main memory.
> > 
> > I tried running select queries on the tables( with about 2k records
each
> > having about 5 strings) and they do well within 20kB of runtime heap
> > usage.
> > 
> > But, when I try new insertions, the heap usage grows tremendously
(about
> > 70 kB at peak).
> 
> Perhaps preparing the statements (sqlite3_prepare) might decrease RAM 
> use somewhat.
> 
> Can you post an example of your schema and these insert statements?

Is your temp_store in memory or flash ram or other?

Another thought... are you performing a COMMIT after each INSERT?
(or at least every X inserts, where X<100)?
It might help to reduce memory (at the cost of reduced speed).



   

Get the free Yahoo! toolbar and rest assured with the added
security of spyware protection.
http://new.toolbar.yahoo.com/toolbar/features/norton/index.php


-
To unsubscribe, send email to [EMAIL PROTECTED]

-


**
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
[EMAIL PROTECTED]
**


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



RE: [sqlite] How to restrict the peak heap usage during multiple inserts and updates?

2007-05-28 Thread Kalyani Tummala

Hi joe,

Thanks for your response. 

In order to reduce the footprint size, I have bypassed parser completely
and using byte codes directly as my schema and queries are almost
compile time fixed. Hence I am not using sqlite3_prepare(). 
 
The following is the schema and inserts I am using. 
CREATE TABLE OBJECT(

PUOIINTEGER  PRIMARY KEY,
Storage_Id  INTEGER,
Object_Format   INTEGER, 
Protection_Status   INTEGER,
Object_Size INTEGER,
Parent_Object   INTEGER,
Non_Consumable  INTEGER,
Object_file_nameTEXT,
NameTEXT,
File_Path   TEXT
);

CREATE TABLE AUDIO(

PUOIINTEGER PRIMARY KEY,
Use_Count   INTEGER,
Audio_Bit_Rate  INTEGER,
Sample_Rate INTEGER,
Audio_Codec_TypeINTEGER,
Number_of_Channels  INTEGER,
Track   INTEGER,
Artist  TEXT,
Title   TEXT,
Genre   TEXT,
Album_Name  TEXT,
File_Path   TEXT
);

INSERT INTO OBJECT VALUES (
 7, 65537, 12297, 0,
 475805, 6, 0, 
 'ANJANEYASTOTRAM.mp3', NULL,
'C:\\MTPSim\\Store0\\Music\\Artist\\Album\\ANJANEYASTOTRAM.mp3'
);


INSERT INTO AUDIO VALUES (
 7, 6, 144100, 0,
 0, 0, 6, 
 NULL, NULL, NULL, NULL,
'C:\\MTPSim\\Store0\\Music\\Artist\\Album\\ANJANEYASTOTRAM.mp3'
);

INSERT INTO OBJECT VALUES (
 8, 65537, 12297, 0,
 387406, 6, 0, 
 'BHADRAM.mp3', NULL,
'C:\\MTPSim\\Store0\\Music\\Artist\\Album\\BHADRAM.mp3'
);


 INSERT INTO AUDIO VALUES (
 8, 6, 144100, 0,
 0, 0, 6, 
 NULL, NULL, NULL, NULL,
'C:\\MTPSim\\Store0\\Music\\Artist\\Album\\BHADRAM.mp3'
);


Warm regards
Kalyani

-Original Message-
From: Joe Wilson [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, May 29, 2007 9:42 AM
To: sqlite-users@sqlite.org
Subject: Re: [sqlite] How to restrict the peak heap usage during
multiple inserts and updates?

> I am working at porting sqlite ( ver 3.3.8 ) on an embedded device
with
> extremely low main memory.
> 
> I tried running select queries on the tables( with about 2k records
each
> having about 5 strings) and they do well within 20kB of runtime heap
> usage.
> 
> But, when I try new insertions, the heap usage grows tremendously
(about
> 70 kB at peak).

Perhaps preparing the statements (sqlite3_prepare) might decrease RAM 
use somewhat.

Can you post an example of your schema and these insert statements?



   

Choose the right car based on your needs.  Check out Yahoo!
Autos new Car Finder tool.
http://autos.yahoo.com/carfinder/


-
To unsubscribe, send email to [EMAIL PROTECTED]

-


**
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
[EMAIL PROTECTED]
**


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



[sqlite] How to restrict the peak heap usage during multiple inserts and updates?

2007-05-28 Thread Kalyani Tummala
Dear group,

 

I am working at porting sqlite ( ver 3.3.8 ) on an embedded device with
extremely low main memory.

I tried running select queries on the tables( with about 2k records each
having about 5 strings) and they do well within 20kB of runtime heap
usage.

But, when I try new insertions, the heap usage grows tremendously (about
70 kB at peak).

I am looking at restricting this number ( not more than 30 kB ).

I tried the following

a. changed SQLITE_DEFAULT_PAGE_SIZE in pager.h to 512 from 1024

b. changed SQLITE_MAX_PAGE_SIZE in pager.h to 1024 from 32768

c. Also, I have reduced the following 2 parameters in sqlite3Int.h

#define SQLITE_DEFAULT_CACHE_SIZE 4 ( from 2000 )

#define SQLITE_DEFAULT_TEMP_CACHE_SIZE 4 ( from 500 ! )

 

All these still don't help much in restricting the peak heap usage.

Can anyone suggest me pointers to reduce the runtime memory usage
further?.

 

Thanks in advance

Kalyani

 


**
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
[EMAIL PROTECTED]
**



[sqlite] using precompiled queries and turning off sql parser at compile time

2006-12-05 Thread Kalyani Tummala
Hi,

In one of the group mails I have read about precompiled queries to
improve the performance and reduce the foot print size and also heap
size. In my application I have some fixed set of queries. Can some one
point me to the sections of code that I can manipulate to do the same?
Is it possible to detach the parser altogether and come up with a
wrapper to handle specific queries? 

 

Thank you in advance.

 

Kalyani


**
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
[EMAIL PROTECTED]
**



RE: [sqlite] Query on database operations.

2006-11-30 Thread Kalyani Tummala
Hi Nicolas,
Thanks for the reply. My database is fixed in the number of tables and
fields. I mean Schema cannot be altered once it is created. But the
database records might grow even more than 20K in number. I have tried
select query with and without indexes. Selection without indexes is very
costly. Hence I don't think we can omit indexes.

-Original Message-
From: Nicolas Williams [mailto:[EMAIL PROTECTED] 
Sent: Thursday, November 30, 2006 8:47 PM
To: sqlite-users@sqlite.org
Subject: Re: [sqlite] Query on database operations.

On Thu, Nov 30, 2006 at 08:03:00PM +0530, Kalyani Tummala wrote:
> With indexes on every column(searched), the following is the heap size
> for different database operations on a database with 100 records and 6
> tables with an avg of 10 to 15 fields each.

You can probably get by quite well without indexes on such small
databases.  Dropping the indexes should lead to simpler compiled
queries, and that hopefully to less heap usage (certainly less page
cache usage).

Nico
-- 


-
To unsubscribe, send email to [EMAIL PROTECTED]

-


**
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
[EMAIL PROTECTED]
**


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



RE: [sqlite] Query on database operations.

2006-11-30 Thread Kalyani Tummala
Hi John,
Thanks for your help. I have another doubt? If I turn off the sql
compiler, should I have to fix my insert,delete,select,update
operations? My operations are almost fixed in nature. Can you tell me
how exactly I do this?


-Original Message-
From: John Stanton [mailto:[EMAIL PROTECTED] 
Sent: Thursday, November 30, 2006 11:26 PM
To: sqlite-users@sqlite.org
Subject: Re: [sqlite] Query on database operations.

You might find that a version of Sqlite which omits the compiler might 
fit your application.  You get a smaller footprint, but at the cost of 
having to use pre-compiled SQL, which means that you cannot dynamically 
create SQL.

Kalyani Tummala wrote:
> Hi,
> 
> This mail is a bit lengthy. I thank you in advance for your patience
and
> help:-).
> 
>  
> 
> Here we go..
> 
>  
> 
>  I need to port sqlite to a platform where the RAM size is too small
> about 512kb.  For that I need to tune sqlite to make its footprint,
heap
> and stack memory as small as possible. 
> 
>  
> 
> As said in the documentation on sqlite.org, I could get the least
> possible footprint of 170KB with all the optional features turned off.
> 
>  
> 
> My Analysis of heap and stack usage is as follows.
> 
>  
> 
> Stack memory is consistent about 9-10K
> 
>  
> 
> Heap memory is highly variant on size and number of records. I tried
> modifying the page size(SQLITE_DEFAULT_PAGE_SIZE and
> SQLITE_MAX_PAGE_SIZE ) in pager.h from 512 to 2048 but found no
> reduction in heap size. 
> 
>  
> 
> With indexes on every column(searched), the following is the heap size
> for different database operations on a database with 100 records and 6
> tables with an avg of 10 to 15 fields each.
> 
>  
> 
> OperationMAX Heap
> Average Heap(Bytes)
> 
> insertion
> 
> 85939
> 
> 24166
> 
> deletion
> 
> 397834
> 
> 76541
> 
> Selection of all records
> 
> 246973
> 
> 79075
> 
> Update of all records
> 
> 249808
> 
> 196334
> 
>  
> 
> It seems quite a huge heap consumption. Are these numbers as expected?
> Is there a way that I can reduce these numbers in the range of 40-50kB
> by any means (including accessing pattern). 
> 
>  
> 
> I would like to know the reason for high heap consumption for deletion
> operation. 
> 
>  
> 
> Thanks in advance.
> 
> Kalyani 
> 
>  
> 
>  
> 
> 
> **
> This email and any files transmitted with it are confidential and
> intended solely for the use of the individual or entity to whom they
> are addressed. If you have received this email in error please notify
> [EMAIL PROTECTED]
> **
> 
> 



-
To unsubscribe, send email to [EMAIL PROTECTED]

-


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



[sqlite] Some Queries.

2006-10-13 Thread Kalyani Tummala
Hello,

I am a new user of this group (just joined).  First of all I appreciate
you for creating and maintaining such a small and robust database. I
have a few simple queries on sqlite regarding footpring. I hope the
owner has the answers.

 

In sqlite features(www.sqlite.org  ) it was
given that

*   Small code footprint: less than 250KiB fully configured or less
than 150KiB with optional features omitted. 

And There is a document called "Compilation options for sqlite" which
says to use macro definitions to the compiler and also to the lemon
tool. 

On ARM-linux platform with all the features included I got a footprint
of 260KB 

When I  turned off these features(all mentioned in Compilation options
for sqlite doc except SQLITE_OMIT_COMPLETE), the footprint is 249KB. I
need a footprint of 150K.  How can I get it?

 

Regards

Kalyani

 

 

 

 

 

 

 


**
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
[EMAIL PROTECTED]
**