Monday, January 9, 2012

Avoid rowset processing in an Application Engine program.

Avoid rowset processing in an Application Engine program. Loading data into a rowset can use a significant amount of memory, approximated by the following formula:

mem = nrows * (row overhead + nrecords * ( rec overhead + nfields * ( field overhead) + average cumulative fielddata))

where

· mem is the amount of memory required to store the rowset.

· nrows is the number of rows.

· row overhead is the overhead per row.

· nrecords is the number of records per row.

· rec overhead is the record overhead (approximately 40 bytes).

· nfields is the number of fields in the record.

· field overhead is the overhead per field (approximately 80 bytes).

· average cumulative fielddata is the average amount of data per field.

Using this formula, a rowset containing 500,000 rows with one record per row, 50 fields, and 200 bytes per field would require approximately 2.3 gigabytes of memory.

0 comments:

Post a Comment