NAME
repack-file-index - reorganize a FramerD file index
SYNOPSIS
repack-file-index [-q] [-v] < file_index > [ output_file ] [--size new_size ] [--min min_vals ] [--max max_vals ] [--bsize block_size ] filename [ new_name ] [ min ] [ max ] [ block_size ]
DESCRIPTION
repack-file-index reorganizes a FramerD file index by consolidating associations into continuous blocks on disk, possibly increasing the number of slots in the table, and reordering keys to prioritize keys with more values. It also removes duplicate associations and sorts large associations for more efficient processing upon retrieval.
FramerD file indices are designed to be updated incrementally, but such incremental additions can leave related data spread throughout the file. repack-file-index reorganizes this data to save space and can dramatically improve performance by reducing the number of file seeks required to retrieve the associations for a given key.
repack-file-index reads the file index stored in file_index and writes a new file index to output_file. If output_file is not provided, the new index is written into a temporary file and copied back into file_index when it is completely generated.
OPTIONS
- -q
-
Run quietly, without progress reports to the console.
- -v
-
Run verbosely, without progress reports to the console.
- --size size
-
Create the new index file with size slots. If size is the literal keep , the current size of the index is maintained. If the size specified is smaller than the number of slots, the minimum number of possible slots is chosen.
- --min min_vals
-
Exclude keys associated with fewer than min_vals values.
- --max max_vals
-
Exclude keys associated with more than max_vals values.
- --bsize block_size
-
In order to improve performance, repack-file-index reads blocks of values together and schedules its disk accesses within any particular. This incurs a memory cost as the number of values in a block increases. The block_size parameter can control this cost by using the smallest feasible block size larger than block_size
DIAGNOSTICS
The program reports an error if filename does not exist or does not contain a valid file index. It also reports an error if either output_file cannot be written or filename cannot be overwritten (whichever it needs to do).
BUGS
The trimming of keys by max and min do not correctly register repeated values. If this is a problem, it can be worked around by first repacking the file index without value bounds (removing duplicate values) and then repacking with the desired bounds.
Revision Info
$Id: repack-file-index.1,v 1.4 2002/07/10 00:13:11 haase Exp $
AUTHOR
Ken Haase < [email protected] >
SEE ALSO
framerd(7) analyze-index(1) make-file-index(1)