Sign up on the Revelation Software website to have access to the most current content, and to be able to ask questions and get answers from the Revelation community

At 14 NOV 2000 03:47:12PM Peter Dunlap wrote:

Can anyone tell me how to calculate the LK file size that will be generated for a given number of rows, keys and frame size?

I am attempting to pre-size a table such that it's LK file size will be close to, but not in excess of 2gb.

TIA


At 15 NOV 2000 09:11AM Don Miller - C3 Inc. wrote:

Peter ..

It's not quite as simple as you'd like. The general case is that you compute the record length of an "average" record (including @FM's @VM's, etc.) Add 1 for the @RM. Take the Length of an "average" key and add 2. Add this to the computation above.

Next multiply the number of records anticipated by this value. Subtract the frame header overhead from the frame size (24 bytes, if I recall properly). Divide the total size of the data (computed above) by the frame data content (frame_size less overhead) and add 1. This will give the total number of frames to be allocated. Multiply this by the actual frame size to give you the total number of bytes needed.

The problem is that you will inevitably get some "overflow" frames allocated given the way that the hashing algorithm distributes keys within frames so you just can't predict the size of the .LK file or, for that matter, the size of the .OV file. Also, the threshhold percent will affect how the distribution of keys and frames will be allocated.

Anyway, it's not an exact science. Sometimes I presize a file 30% larger than I need. Make sure that the sizelock value is set to 2 so it won't resize during the initial load. Import the data and then set the sizelock to 0 to let it resize itself with use.

Don Miller

C3 Inc.

View this thread on the forum...

  • third_party_content/community/commentary/forums_nonworks/580dd06bfb5dbad68525699700722f92.txt
  • Last modified: 2023/12/28 07:40
  • by 127.0.0.1