I'm in the process of migrating a number of legacy databases from Type 1 to Type 2 Storage Areas and have some (hopefully) not too hard questions.
There might be a typo in the manuals.
Managing the OE Database with OE Management (page 72) reads:
* Take the mean record size
* Add 20 to this number
* Divide 8192 (8K blocksize) ... by the number in step 2.
The Database essentials (page 4-8) however states that:
* Take the mean record size
* Add 2 to this number
* Divide 8192 (8K blocksize) ... by the number in step 2.
1) Which one is right?
2) How do I determine of go up or down to the closest power of 2?
Blocks per Cluster seems trickier. I can't find any good way of calculating this. I found two versions:
a) Managing the OE Database with OE Management (page 91) specifies a table based on RPB and minimum record count.
b) http://communities.progress.com/pcom/message/91195#91195 (Always use 8)
3) Which one is right?
4) How do I handle empty and unused tables that might be used in the future? Put them in a separate "unused" extent or try to calculate RPB manually (for instance by creating records)?
5) How do I handle indexes? RPB 1 and 8 BPC and put them all in the same extent?
That's all for now I guess.
Nobody? These question are kind of keeping me from getting started with the migration...
Nobody? These question are kind of keeping me from getting started with the migration...
I'd discuss the obvious contrariety in the documentation with tech support.
Good idea, I'll do that. Now there's just the rest...
20 is more correct.
Round up.
Blocks per cluster has more to do with the table (or index) size and the expected growth rate. Always use at least 8 (otherwise it is a type 1 area). Use 8 for most indexes (a lot of indexes are small) and for small tables. Use 512 for very large tables. In between it's largely a matter of taste.
I usually group indexes into areas that correspond to the table data. So if I have an area called "misc128_data" I will also have one called "misc128_idx".
If you know (or can reasonably guess) what the future characteristics of a currently empty table will be then put it in the appropriate area.
Otherwise I create an "unused" area and monitor it to make sure it *stays* unused I usually give it a RPB of 64 or 128 and use 8 blocks per cluster -- those are fairly safe choices. (I also create a corresponding unused_idx area.)
It would be really nice if Progress provided a "default area" that is different from the schema area which followed these guidelines. Maybe v11?
Thanks alot!
It would also be nice if Progress provided a migration tool that could look at needed tab/indexanalys output from an old school type 1 database and create an appropriate .st-file (and tablemove scripts). Of course you would have to modify it at bit for your specific needs but it sounds doable, doesn't it?
/Jens