× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



On 21-Mar-2012 20:32 , Mike Krebs wrote:
How does a SQL created table extend itself? A record at a time?

Because an algorithm determines the next dataspace extent size, there is no one specific answer, although to be sure, the extents are not "record at a time". There is a minimal extent, I believe based on the effective [fixed-length] record size along with the expected number of records to be added according to the current activity statistics for the dataspace. There is a separate algorithm for extending the variable segment(s)

So... An extent will /leave space/ for some number of additional records to be inserted without another extent. The dataspace size, even for a very simple format [e.g. RCDLEN(nbr)] may take significantly more storage than would be calculated based on the number of rows, after a large number of insert activity was directed to that file using SIZE(*NOMAX); e.g. after being the target of a CPYF with many records.

Two consecutive RGZPFM [no allow-cancel] against a member with ALLOCATE(*NO) should reduce the dataspace size to reclaim the allocated but unused space; reduced to the minimal extent, IIRC. Of course unless known there will be no additional rows added, a reorganize request is an expensive operation to effect reclaiming a tiny amount of storage in most cases, and impacts the performance of the next insert activity if\when they occur because a new extent will be required. Note that INZPFM has the option to allocate to the Next Increment, but that refers to the "Increment number of records" element of the SIZE parameter, not the next LIC extent; i.e. not allowed when SIZE(*NOMAX) is in effect.

For any one file, the extent size can be inferred by reviewing the "Data space size in bytes" field MBDSZ2 from DSPFD for *MBR details [QAFDMBR model output file] after each insert of one row. I just did that for a five column [all char(100)] TABLE, and after the eighth row inserted the dataspace size went from 12,288 to 20,480 bytes which revealed as [probably the minimal] extent size, 8K. I then ran two consecutive RGZPFM against the member, and the size remained 20,480 bytes, so I infer the minimal increment was 8092 bytes. That was done on a v5r3 system.

The following messages and\or the other messages in the threads, may have commentary of interest for the subject of this thread, and for the question quoted in this message.

_i Subject: Re: Efficiency question on file extents... i_
http://archive.midrange.com/midrange-l/201202/msg00465.html
_i Subject: Re: PF data space management i_
http://archive.midrange.com/midrange-l/200803/msg01703.html
_i Subject: RE: Max Records in Physical or Printer Files i_
_i - To Max or Not To Max... i_
http://archive.midrange.com/midrange-l/200201/msg00653.html

Regards, Chuck

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.