Referring to the following sample Reorg script, what unit is largest_extent_required and freespace_required defined in? Also why is the amount of freespace_required many times bigger than largest_extent_required?
begin
if not quest_spc_util.wait_for_freespace(
tablespace => 'PSAPBTABI',
largest_extent_required => 698720,
freespace_required => 4631480)
then
raise_application_error(-20102,'Free space not available');
end if;
end;
When generating a Reorg script, Space Manager with LiveReorg makes estimates on how much space is required, and checks at script generation time to make sure the space is available. But other activity could allocate the space between script generation time and run time. To catch allocation issues as early as possible, it also checks that the space is still there at run time - it checks if there is both sufficient total space and for contiguous space for largest extent to be allocated.
The largest_extent_required and freespace_required are defined in Kbytes. Largest_extent_required is the largest amount of contiguous freespace that must be available and the estimated allocation required for the segment will be multiple extents.