Is there a way of trying to evaluate the amount of space a new key will take in a database.
And before anyone mocks me....
We know how many records are in the table.
We know the structure of each field type - CODE 10, DECIMAL etc
We know how many Sum Index fields we want - not relevant, but...
And we also know how the size of the record, Table size and Optimisation.
So is there a 'formula' which could be looked at which would help you to make a decision about whether to add a key or not.
We are talking about tables with over 2,000,000 records, so adding keys has a dramtic effect on free space, especially as we are running CLASSIC server.
Darren Beetlestone
0
Comments
The question should rather be : What do I gain in reading performance and what do I loose in writing performance.
E.G.1: if it is for a report you use only once a month, and it is a table on which a lot of writes happen (like G/L Entry or Item ledger Entry), it is better not to create it and try to use an existing key that maybe is not perfect.
E.G.2: if it is a key to be used for searching a record in a posting codeunit (and you post a lot, and it is a big table), in this case it is better to create it.
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!
It also depends on the SIFT levels you intend to maintain. If there is a date field in your SIFT key, then you may want to consider only turning on the ddaily one and disabling the other ones. If you intend to run the report once a month, then you want to maintain only the month one. There's lots of things to think about when adding a key.
RIS Plus, LLC
We are using NATIVE Navision server - I mentioned this.
And the reasons for determining whether the key is added is so that we can decide whether the 'feature' is one that will be added or discarded as not advisable.
I have done a few checks myself in a custom table with 10,000 records, and comparing Table size, Record size etc when adding new keys, adding fields to existing keys, and the effect of different field types in the keys.
I was just hoping that someone had already looked into this, so that I didn't have to reinvent the wheel.
RIS Plus, LLC