Re: row sizes
Posted in 1995
The simplest way is to look at the rowsize information in SysTables. Failing that, you have to work out the sizes of the individual fields. DATE 4 INTEGER 4 SERIAL 4 SMALLINT 2 FLOAT 8 SMALLFLOAT 4 DECIMAL(x,y) varies; see decimal.h MONEY(x,y) varies; treat as DECIMAL CHAR(n) n VARCHAR(n) n; you can get fancier if you want to use averages... DATETIME varies; ugh! Based on DECIMAL. Work out the total digits and then treat as DECIMAL; only count fractional digits if there is a fraction. INTERVAL varies, more or less the same as DATETIME. BYTE 56 TEXT 56 BYTE and TEXT will also require the actual storage for the blob, of course. With SE, there will be one extra byte for each row, with either a ASCII NUL '\\0' or a newline '\\n' in it, indicating a deleted or active row. This isn't present in OnLine. Humph. Isn't this in the FAQ? Yours, Jonathan Leffler (johnl@informix.com) #include <disclaimer.h> >Date: Tue, 10 Oct 95 16:57:49 BST >From: Manoj Schroff <manoj@dalsys.co.uk> >X-Informix-List-Id: <list.7632> > > Does anyone out there know how to work out the row size >of a table from a sql table definition ? > > Manoj Schroff (manoj@dspdev.dalsys.co.uk)