On Fri, Feb 19, 2010 at 07:57:15AM -0800, a1rex scratched on the wall: > 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.
Leaf pages hold more than one record. I suggest you read up on the SQLite file format. A smaller page size will often lower I/O performance. It depends quite a bit on the OS and filesystem you're using. The whole reason Windows tries to match the page size to the cluster size is that a cluster is the minimum write chunk for the filesystem. Using a smaller page size slows down writes, as the whole filesystem chunk needs to be read, part of it changed, and then the whole thing written back. Most classic UNIX FFS filesystems use a 512 byte block, hence the smaller default for other OSes. Like nearly all performance related issues, you need to understand what is going on at a lower level to make good decisions. > This would conserve memory. Not always. The per-page memory overhead in the cache is constant. Using a smaller page size means you get less database data in the cache for the same amount of memory. Smaller pages also lead to more fragmentation, but larger pages can lead to less utilization in the case of extremely small data-sets. Again, you need to know your data and your environment. > How vital is default number of pages for database performance? Depends on if you ever hit the maximum number or not. -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 _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users