Hi, Pavel, Thanks for your comments.
Another question is if Sqlite uses at least 1 page for each table and index, does it means if the contents in a table doesn't fill 1 page, Sqlite will not request a new page when operating this table. Is it right? BR Rick -----Original Message----- From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users-boun...@sqlite.org] On Behalf Of Pavel Ivanov Sent: Tuesday, May 11, 2010 9:33 PM To: General Discussion of SQLite Database Subject: Re: [sqlite] DB files are different between PC side andinstrumentside. > But I think at least > Sqlite3 should have used most space on the sector when it request a > new sector. Due to internal SQLite specifics it uses at least 1 page for each table and index. So even if you don't store there anything with a big schema database will still consume significant amount of disk space. Probably from your point of view it's a waste of space but it's necessary trade-off to make it light. > Maybe I need to return a smaller number when querying the sector size. Read the link Dan gave you. Issuing 'pragma page_size' before creation of any tables in the database is enough. Pavel On Tue, May 11, 2010 at 4:29 AM, Lei, Rick (GE EntSol, SensInsp) <rick....@ge.com> wrote: > Hi, Dan, > > Yes, I noticed this setting. The sector size in SDHC card is 4Kbyte > which is different from the size of harddriver. But I think at least > Sqlite3 should have used most space on the sector when it request a > new sector. It looks like that the Sqlite wastes a lot of space on > SDHC card. Of course the space is not a problem now. Because we can > easily find a 8G or 16G SDHC card. However I think we still need to > take care of it. Maybe I need to return a smaller number when querying > the sector size. > > BR > Rick > > -----Original Message----- > From: sqlite-users-boun...@sqlite.org > [mailto:sqlite-users-boun...@sqlite.org] On Behalf Of Dan Kennedy > Sent: Tuesday, May 11, 2010 4:18 PM > To: General Discussion of SQLite Database > Subject: Re: [sqlite] DB files are different between PC side and > instrumentside. > > > On May 11, 2010, at 2:54 PM, Lei, Rick (GE EntSol, SensInsp) wrote: > >> >> Hi, >> >> I ported Sqlite3 to my instrument. The database file is stored in a >> SDHC card. Sqlite3 runs ok. However I found the database file >> generated on instrument side is much bigger than the file on PC side. >> I checked the files generated on instrument by UltraEdit. I found a >> lot of space which is full filled with 0 in the file. And I can't >> find > >> these parts in the files generated on PC side. I don't know why the >> files are different between PC side and instrument side. I think they >> should be same. Is there any advice? > > Different page sizes. > > http://www.sqlite.org/pragma.html#pragma_page_size > > _______________________________________________ > sqlite-users mailing list > sqlite-users@sqlite.org > http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users > _______________________________________________ > sqlite-users mailing list > sqlite-users@sqlite.org > http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users > _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users