Professional Documents
Culture Documents
Navision Database Sizing Tool
Navision Database Sizing Tool
Navision Database Sizing Tool
Introduction
The Navision Database Sizing Tool (NDST) is designed to give estimates of database
growth in order to assist in planning hard disk requirements. The tool can be used, either
to make estimates for new implementations, or to make forecasts for database growth for
existing implementations.
Feedback
Please report any product issues the normal way (via VSA). However, if you have any
comments on how to improve this tool, or if you have any positive or negative feedback
to the tool, then please send your comments / ideas to Lohndorf@Microsoft.com
1
Scope of NDST
NDST can be used for either Database option for Navision (Native or SQL).
The NDST will only give you estimates. The results it gives can only be regarded as
guidelines to how much your database will grow. Exact database growth depends on a lot
of customer specific factors. No two customers will have the exact same record sizes, or
create the exact same number of new records pr order. Database growth depends on
factors such as:
1) Application areas used. A few examples: Customers using Warehouse Management
will create additional records such as Picks, Putaways, Warehouse entries etc; if the
customer uses Analysis Views, then this will add to database growth; synchronizing
contacts with customers will add to the space used, etc.
2) Working practise. The more fields you enter in a record, the more space it will take
up. A customer who enters all information (maybe including comments) on all
records will use more space than a customer with the same number of records, who
only enters basic information.
3) Record Size is based on the size of the table compared to the number of records in
that table. The size of a table includes indexes (keys). So record sizes will be
affected by the number and size of indexes.
The record sizes that NDST uses for calculations are therefore estimates only, and are
based on a very simple setup. The real numbers may well be different. For a more
detailed discussion of what to be aware of when estimating the number of records created
during normal use of Navision, please refer to Appendix C.
Contents of NDST
NDST contains:
DBSizingWorksheet.xls,
NDST.fob
SpaceUsed.sql, and
Navision Database Sizing Tool.doc (This document).
As mentioned, NDST can be used either before implementing a new system, or it can be
used on an existing system to forecast future database growth.
2
Estimating Database Size of a new system
For this, you only need to use the spreadsheet DBSizingWorksheet.xls. The spreadsheet
looks like this:
In short, you only have to enter your own estimates in the grey areas. The spreadsheet
will then calculate the Total Estimated Size of the database.
3
described below.
Number of orders Enter the numbers of orders you expect.
This includes sales as well as purchase
orders.
Number of lines pr order Enter the average number of lines on an
order
Number of dimensions Enter the average number of dimensions on
an order.
Once you have entered these values, then the spreadsheet will show you the calculated
estimated total. The spreadsheet adds up the total size of data based on the numbers you
entered. It then adds two values:
Initial Size: Even an empty database has a size.
Overhead: The spreadsheet calculates database growth based on the amount of
data in the most commonly used tables. To cater for other tables (e.g.
comments, G/L Accounts, Budget Entries, To-dos etc), it adds an estimated
overhead, set to 10%.
The RecSizes sheet contains the estimated average size of a record in all the tables that
are used to estimate database growth.
4
At the top you have Base Tables, and lower down you have Dynamic tables.
Because record size is often different depending on the database option, Average Size is
specified for both Native, and for SQL. Average Size (Bytes) is the average size of one
record.
For dynamic tables, you also have the columns Records or order, and records pr line. This
specifies how many records are created when you post one order (sales or purchase). For
instance, we estimate that posting one order creates three G/L entries and three Item
Ledger Entries pr. line. These values can depend a lot on the settings in Navision. For
instance, if you have activated Automatic cost Posting, then one order will create at least
two additional G/L Entries, and “Discount Posting” in Sales & Receivables setup will
also affect the number of entries created pr order. Finally, of course customizations can
affect the number of records created.
Warning! You can change the values on this sheet, but do not move existing rows and
columns. The formulas on the Sizing sheet are referring to many of these cells. If you
move them, the calculations may well start to be wrong.
If you specify any user-defined tables (Other 1..Other 6), then you must also specify the
record size on the RecSizes sheet.
5
Finally, on the right hand side of the Sizing sheet (in the blue square), you can modify the
Initial Size and the Overhead if you wish.
Details
The lower half of the Sizing sheet contains calculated values for a number of tables.
These details will show how much each of the tables are expected to grow, based on the
values you have entered.
The detail-values are calculated, and should not be overwritten manually. They are
calculated based on the Average Size and Records pr order / line, which is set up in the
RecSizes sheet.
6
system by finding out how much database growth a single operation causes, then multiply
that with the number of expected operations.
It works by taking a snapshot of the current database size, and having tools available to
compare two snapshots.
NDST contains two files for this use: NDST.fob and SpaceUsed.sql.
NDST.fob can be used on either Native or SQL options, where as SpaceUsed.sql can
optionally be used to get some more detailed information for the SQL option.
Version
Type No. Name List
Table 72000 sp_spaceused file Line NDST
Table 72001 Space Used Version NDST
Space Used Version
Form 72000 Lines NDST
Form 72001 Space Used Version List NDST
Form 72005 DB Sizing Card NDST
Snapshot from files
Codeunit 72000 (SQL) NDST
Codeunit 72001 Make Spreadsheet NDST
Codeunit 72003 Snapshot from DB Info NDST
Import them into the database you want to make a growth forecast for.
7
Create Snapshot:
“Create Snapshot” creates a snapshot of the database. Every time you create a new
snapshot, NDST automatically creates a new version. On the DB Sizing Card you can
select one or two versions, then immediately see the number of rows, and the amount of
data in that version, as well as the difference.
By comparing the difference between two versions (snapshots), you can see how much
the database grew in between the time the two snapshots were created. In this way, you
can forecast database growth based on things like:
Running one batch job / posting one order / synchronizing contacts / etc.
Growth pr month / quarter / etc.
Generate Report:
The DB Sizing Card shows an overview. If you want details, then run “Generate Report”
(F9). This will create a new Excel Workbook which shows you the changes for each
individual table. “Generate Report” creates one line for each table which changed (either
no of records, or size). You will get two sheets: Changes, which shows you data for
version 2 plus changes between Version 1 and 2, and Details, which shows you version 1
and version 2. Finally, at the top of the Changes sheet, you will see a summary.
If you have problems making this MS Excel integration work, please refer to the section
Troubleshooting in Appendix B.
Clear:
Clears the contents of the form. It does not delete any data, it only just blanks out the
form. If you Clear the form before creating a snapshot, then the form will automatically
enter the newly created version as Version 1 (or Version 2 if Version 1 is already
specified).
8
SpaceUsed.sql. Set Execute Mode to “Results to File…” (Ctrl+Shift+F), then execute the
query. This batch uses sp_spaceused to export details for each table.
Return to Navision. In the “DB Sizing Card”, onh the SQL tab, specify the file that was
created in Query Analyzer. Then run “Import SQL Snapshot”.
Appendixes
1) Open DBSizingWorksheet.xls
2) In each of the grey columns, enter your estimate. In the example shown below, the
estimate is for 900 customers, 100 vendors etc., and 3650 orders (Purchase and sales)
with an average of 8 lines each):
3) Check the results on the right hand side in the blue square. NDST adds an estimated
initial database size, adds an overhead, and calculates the Total Estimated Size.
9
Tutorial 2 – Create snapshots to identify database growth over time
1) Import the objects in NDST.fob into Navision. Use either Native or SQL version.
2) Run form 72005 “DB Sizing Card”. From the Functions button, select Clear to clear
the form.
3) From the Functions button, select “Create Snapshot”. This will create a new version,
and enter the new version number as Version 1.
4) Create a sales order and post it (or perform any other activity that will create new
records).
5) Go back to the “DB Sizing Card”, and run “Generate Snapshot” again. It will create a
new version, and automatically specify this new version as Version 2. With Version 1 and
Version 2 specified on the card, you can see number of new records (rows), and new data
(KB) between the two versions.
6) To get some more details, run Functions, “Generate Report”. This will create an Excel
Spreadsheet with details for each table.
Appendix B – Troubleshooting
The “Generate Report” was developed using Microsoft Office 2003, but has also been
tested to work with Office 2000. If you have problems making this work, then:
1) Make sure you have Office installed.
10
2) Even though Office 2003 if backwards compatible, previous versions may have
problems. If this is the case, design codeunit 72001 “Make Spreadsheet”. Go to
View, Globals, and check the four Automation variables – they will most likely say
“Unknown Automation Server”. Even if they say “Unknown Automation Server”, it
may still work. If not, try to re-set the variables to fix the installed version of Office:
For each Automation variable, look up in the SubType column, then look up under
Automation Server:
11
As explained in the section “Changing the underlying factors”, you can change the
factors that DBSizingWorksheet.xls uses to calculate the estimated database size. For
instance, if you activate “Automatic Cost Posting”, then Navision will create 5, not 3 G/L
Entries for each order you post. You can update DBSizingWorksheet.xls to reflect this.
Example:
Set up Navision the way the customer will be using it, and create a typical order. Create a
snapshot, post the order, then create a snapshot again. Run “Generate Report”, and you
can now see exactly how many entries in each table were created, and you can update
DBSizingWorksheet.xls with these Values.
Part shipping:
Every time you part ship an order, Navision will create posted documents, entries,
dimension entries etc. So if you part ship / invoice orders, then database growth pr order
can multiply compared to if you only ship and invoice full orders.
Once you have a good idea about how many records are created when posting an order,
then update DBSizingWorksheet.xls to get a more precise estimate of database growth.
12