Re: quick help needed to calculate page sizes for logs [4230
Posted in 2005
Topics: Data Types & Schema Design, Transactions, Locking & Isolation
Does the table contain variable length columns (ie VARCHARs & LVARCHARs)? The
actual storage required for each row will be the actual current size of the row
NOT the maximum size. Informix assumes that you will not use more of a VARCHAR
column than the current size rounded to the reserve size or that you will use
more than the current size of an LVARCHAR column, so the rows are 'compressed'
on the page with as many rows as will fit.
Art S. Kagel
----- Original Message -----
From: Floyd Welle.... <fwellers@yahoo.com>
At: 2/10 9:27
> Hi,
> We have a newly transaction logged database. We are going to do some updates
> that will update all the rows in some tables inside a transaction. So I am
> trying to ensure we have enough logs do do the transaction.
> I am approaching this from two points.
> 1) the logs.
> We have 12 logs at 12800 pages each, and a high water mark of 45%, which
> tells me that we can only do a transaction of about 275 megs before a long
> transaction occurs.
> No problem here.
>
> 2) I need to find how big the transactions will be on each of these tables,
and
> then, from what I understand, double that amount, as many updates will need
to
> store a before image and an after image of each row, in the logs.
>
> Ok, so,
> for instance, oncheck -pt shows a table to have a maxrowsize of 1161, and
53,411
> number of rows. I would think that if I multiply those 2 numbers and divide
by
> 4096 ( 4kpage size), I would get the approximate number of pages needed to
store
> that table.
> However, the number I get is 15,000 some odd pages, and according to the
oncheck> -pt that table is only using around 5000 pages. Where is the discrepancy, I
> must be doing somethign wrong here.
>
> Then I figure, if I can get the correct size of the table, multiply that by
2,
> and just ensure that I add enough logs so that 45% of them will be enough to
> store that amount of data.
>
> Any advice on this would be appreciated.
>
> Thanks,
> floyd
>
>
> ========================
> -<<Floyd Wellershaus>>-
> Database Administrator
> Unix Administrator
>
> email: fwellers@yahoo.com
> Work: 703-733-4126
> Pager: 703-705-9241
> Email Pager: 7037059241@my2way.com
> Home: 703-430-0805
> Cell: 703-477-6045
> ========================