Also in calculations to the best of my knowledge all columns occupy a minimum of 4 bytes even if define for a size less than 4. For example a column defined as TEXT(1) still occupies 4 characters. This is to accommodate an internal representation/coding to indicate NULL. Jim Bentley, American Celiac Society 1-504-737-3293
-------------------------------------------- On Sat, 11/30/13, Mohammed Sattar <[email protected]> wrote: Subject: [RBASE-L] - Re: knowing the size of a Table To: "RBASE-L Mailing List" <[email protected]> Date: Saturday, November 30, 2013, 1:10 AM Thanks Razzak and Albert for your help Just how it shows in Forms and Reports Size ( bytes ) Mohammed Sattar Utah Group of Companies -----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of A. Razzak Memon Sent: Friday, November 29, 2013 2:53 AM To: RBASE-L Mailing List Subject: [RBASE-L] - Re: knowing the size of a Table At 12:28 PM 11/28/2013, Albert Berry wrote: >Num_Rows * Row_Size + table headers in file 1. Albert, Nice math, but not quite as simple as that! However, when calculating the actual size of a table, you will have to consider the data and all references to .RB4 or .RX4 that include all BLOB data, including BIT, BITNOTE, BSTR, GUID, VARBIT, and VARCHAR data types. BIT . Holds binary data ..The default length is 1 bit ..The fixed length is 1 to 1,500 bytes BITNOTE . Holds binary data . No length is needed . The variable length is 0 to 4,088 bytes of binary data BSTR (R:BASE eXtreme 9.1/9.5 (64) Only) . Holds binary string data . String data type that is used by COM (Component Object Model), Automation, and Interop functions. Used to support Unicode in table data. ..Composite data type that consists of a length prefix, a data string, and a terminator. GUID (R:BASE eXtreme 9.5 (64) Only) . Binary global unique identifier to store unique values, which is represented as a 32-character hexadecimal string . As the GUID data type is a binary value, it will increase retrieval of data from tables for indexed columns VARBIT . Holds binary data . No length is needed VARCHAR . Holds alphanumeric data . No length is needed A new FUNCTION to dynamically calculate the "TableSize" of any given table by R:BASE Engine would be a nice enhancement in R:BASE eXtreme 9.5 (32/64) and higher ... Very Best R:egards, Razzak. www.rbase.com www.facebook.com/rbase -- 30+ years of continuous innovation! 15 Years of R:BASE Technologies, Inc. making R:BASE what it is today! --

