Re: [sqlite] How to know the memory usage of an in-memory database.

2012-06-26 Thread Stephan Beal
On Tue, Jun 26, 2012 at 4:46 AM, Bo Peng wrote: > >> In any case, you set the cache size in pages by executing "PRAGMA > cache_size=" after opening the database connection. > > I am using "PRAGMA cache_size=-300" to set the cache to 3G, but > the process is still slow-going using 23M of RAM,

Re: [sqlite] How to know the memory usage of an in-memory database.

2012-06-25 Thread Bo Peng
>> In any case, you set the cache size in pages by executing "PRAGMA >> cache_size=" after opening the database connection. I am using "PRAGMA cache_size=-300" to set the cache to 3G, but the process is still slow-going using 23M of RAM, despite the fact that it is reading small pieces of all

Re: [sqlite] How to know the memory usage of an in-memory database.

2012-06-25 Thread Pavel Ivanov
On Mon, Jun 25, 2012 at 10:05 PM, Bo Peng wrote: >> Are these multiple tables in a single database (file), or multiple databases >> (files)?  Multiple connections or a single connection? > > Right now there are multiple read-only processes to read the same > file. If I go with any RAM-based solut

Re: [sqlite] How to know the memory usage of an in-memory database.

2012-06-25 Thread Bo Peng
> Are these multiple tables in a single database (file), or multiple databases > (files)?  Multiple connections or a single connection? Right now there are multiple read-only processes to read the same file. If I go with any RAM-based solution, I will have to use a single process to read database

Re: [sqlite] How to know the memory usage of an in-memory database.

2012-06-25 Thread Keith Medcalf
[mailto:sqlite-users- > boun...@sqlite.org] On Behalf Of Bo Peng > Sent: Monday, 25 June, 2012 19:34 > To: General Discussion of SQLite Database > Subject: Re: [sqlite] How to know the memory usage of an in-memory database. > > On Mon, Jun 25, 2012 at 8:29 PM, Keith Medcalf

Re: [sqlite] How to know the memory usage of an in-memory database.

2012-06-25 Thread Bo Peng
> Most of the problem is that by keeping the data in separate tables, you are > ensuring that you almost never get hits from cache.  Do these tables need to > be separate or can you merge them on disk ?  Do they have the same columns ? Unfortunately these tables can have slightly different struc

Re: [sqlite] How to know the memory usage of an in-memory database.

2012-06-25 Thread Bo Peng
On Mon, Jun 25, 2012 at 8:29 PM, Keith Medcalf wrote: > What OS is it that does not have a block disk cache? > > Have you tried simply allocating a large page cache? The application is cross-platform (python / sqlite / C). I frankly do not know how to create large page cache to accomplish what I

Re: [sqlite] How to know the memory usage of an in-memory database.

2012-06-25 Thread Simon Slavin
On 26 Jun 2012, at 2:07am, Bo Peng wrote: > My application needs to run a lot of queries from a large sqlite > database (>100G) with many small tables (>10,000). The performance of > the queries are acceptable if the database is on a SSD drive, but can > be 50 times or more slower on a regular o

Re: [sqlite] How to know the memory usage of an in-memory database.

2012-06-25 Thread Keith Medcalf
> My application needs to run a lot of queries from a large sqlite > database (>100G) with many small tables (>10,000). The performance of > the queries are acceptable if the database is on a SSD drive, but can > be 50 times or more slower on a regular or network drive. > Because some users have

[sqlite] How to know the memory usage of an in-memory database.

2012-06-25 Thread Bo Peng
Dear sqlite experts, My application needs to run a lot of queries from a large sqlite database (>100G) with many small tables (>10,000). The performance of the queries are acceptable if the database is on a SSD drive, but can be 50 times or more slower on a regular or network drive. Because some