In the file 'sqliteLimit.h' has constants that can changed at compiler time but 
the defaults SQLITE_DEFAULT_PAGE_SIZE = 1024 
SQLITE_DEFAULT_CACHE_SIZE 2000 

this info is used to create the database when the database already created the 
size used is in the database header. 

The size of cache is used to reduce the disk access . If the record is less 
than 100 bytes on 1024 will contain aprox. 10 records if you table has no more 
than 10.000 you will need 976 pages to contain all (remember this is a 
prevision, can be different). If you define your cache will contain only 30% of 
data you need only 292 pages. These are only statistics, but you can make a 
similar calculation to set how much memory you will use. 
In my case I take the amount of memory, split 30% of it to sqlite using a 
proportionality to the size of the database for each attach ed; 

----- Mensagem original ----- 
De: "a1rex" <a1rex2...@yahoo.com> 
Para: j...@kreibi.ch, "General Discussion of SQLite Database" 
<sqlite-users@sqlite.org> 
Enviadas: Sexta-feira, 19 de Fevereiro de 2010 12:57:15 (GMT-0300) 
Auto-Detected 
Assunto: Re: [sqlite] One data base versus two smaller ones 

Thank you very much for your help! 

Since my typical record is less than 100 bytes I guess that I can use Page Size 
= 512 bytes 
without degradation of database performance.This would conserve memory. 

How vital is default number of pages for database performance? 
Can I drastically drop the number of pages to number of records accessed by 
user per his typical database session? 

Regards, 
Samuel 


----- Original Message ---- 
From: Jay A. Kreibich <j...@kreibi.ch> 

On Fri, Feb 19, 2010 at 09:39:08AM -0300, Israel Lins Albuquerque scratched on 
the wall: 
> Samuel, 
> 
> Each one attached database has its own page cache with 2000 
> (default number of pages in cache) * 1024 (default size in 
> bytes of a page), 

On many Windows systems it will default to 4096. It tries to match the 
cluster size on NTFS volumes. 

> totaling 2 Mb of ram. 

Actually, it is closer to 3MB (or 9MB) of used memory, as each entry 
in the page cache has some overhead. 

-j 
-- 
Jay A. Kreibich < J A Y @ K R E I B I.C H > 

"Our opponent is an alien starship packed with atomic bombs. We have 
a protractor." "I'll go home and see if I can scrounge up a ruler 
and a piece of string." --from Anathem by Neal Stephenson 



__________________________________________________________________ 
Make your browsing faster, safer, and easier with the new Internet Explorer® 8. 
Optimized for Yahoo! Get it Now for Free! at 
http://downloads.yahoo.com/ca/internetexplorer/ 
_______________________________________________ 
sqlite-users mailing list 
sqlite-users@sqlite.org 
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users 


-- 

Israel Lins Albuquerque 
Desenvolvimento 
Polibrás Brasil Software Ltda. 


_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to