Re: llogspace required
Posted in 1998
Deepa wrote: > > Hi=20 > > Is there anyway to estimate the size of logspace required , if I have to = > delete records from different tables? The data size could be rowsize* = > number of records, what other factors do I need to consider? See June's and Richard's excellent posts, let me just add that the best solution is not to do massive deletes as an SQL transaction at all but to find another solution. Break the deletes down to many smaller transactions either manually or through 4GL or ESQL program that can do this automatically for you. One such solution is my dbdelete.ec which is in my submission to the IIUG Software Repository, called utils2_ak. It fetches rowids or keys and, if by rowid, deletes up to 8196 rows at a time in a single transaction using a single delete statement with a huge IN() clause in the WHERE clause. When deleting by key it falls back to deleting one key value (which may represent multiple rows) at a time with a singleton delete statement within a transaction which it commits every N rows. The BY KEY option is only needed for fragmented tables not created with the 'WITH ROWID' option. My testing shows that dbdelete.ec using the BY ROWID option is as fast as a single delete statement when deleting large numbers of rows. Art S. Kagel