On 15/04/2009 11:50 PM, Nicolas Gaiffe wrote:
> Thank you Igor.
> 
> Does anyone have a clue about estimating the size of a database ?


>> I'm quite new at sqlite and I need to estimate the size the database I am
> creating could reach.
>> Basically, estimating for any table how many bytes would be used for an
> average record.
>> I mainly use INTEGER and REAL values, along with a few TEXT attributes but
> I couldn't find
>> the number of bytes used to store those datatypes. Anyone could help me on
> this ?
>> Is there any header or separator I need to take into account ?

If you want to spend a lot of time in calculations, and probably get it 
wrong, you could rummage through the incredibly well documented database 
structure, available via the "Documentation" tab on the SQLite3 home page.

A practical alternative: create an empty table, generate a script that 
does N inserts with typical values, run the script several times (noting 
the file size after each run), fit a regression line. If you have 
columns that can vary wildly in width, it would be a good idea to use a 
spread of values rather than repeat the average value N times -- this is 
  especially true if you have rows so big that they will go into 
overflow pages.

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

Reply via email to