Navision Database Sizing Tool

You might also like

Download as doc, pdf, or txt
Download as doc, pdf, or txt
You are on page 1of 12

Navision Database Sizing Tool

Navision Database Sizing Tool............................................................................................1


Introduction......................................................................................................................1
Feedback..........................................................................................................................1
Quick start tutorials..........................................................................................................1
Scope of NDST................................................................................................................2
Contents of NDST...........................................................................................................2
How to use NDST............................................................................................................2
Estimating Database Size of a new system......................................................................3
Changing the underlying factors..................................................................................4
Details..........................................................................................................................6
Forecasting Database Growth for an existing system......................................................6
The DB Sizing Card.....................................................................................................7
Appendixes......................................................................................................................9
Appendix A – Quick start tutorials..............................................................................9
Tutorial 1 – Estimate how big a new Navision database will be.................................9
Tutorial 2 – Create snapshots to identify database growth over time........................10
Appendix B – Troubleshooting..................................................................................10
Appendix C – Discussion of factors that affect database growth..............................11

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

Quick start tutorials


This document contains two quick tutorials to give you a quick start to using the tool.
Please refer to Appendix A.

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).

Each of these components are described in this document.

How to use NDST

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.

The factors you can enter are:


Database Version Must be either Native or SQL. The tool will
not except any other values
Customer Enter the number of customers you expect
Vendor Enter the number of vendors you expect
Item Enter the number of items you expect
Contact Enter the number of contacts you expect
Other1 .. Other2 These lines are user defined. For example,
if you want to include the size of your
Fixed Assets table, you can enter a line here
called Fixed Assets, then enter the number
of Fixed Assets you expect. If you want to
enter any user defined tables, then you also
have to edit the underlying factors as

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%.

Changing the underlying factors


NDST uses estimated record sizes to calculate database growth. You can change these
estimates. Reasons for changing the estimates could be, that you have experienced that
the real record size for some table is different to the ones used in NDST, or if you have
customized some tables.

DBSizingWorksheet.xls consists of two worksheets: Sizing and RecSizes. Both


worksheets are protected, except for the grey cells. Before you can modify anything
outside of the grey cells, you have to un-protect the worksheet: Go to Tools, Protection,
and select Unprotect Sheet.

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.

Forecasting Database Growth for an existing system


This part of NDST is designed to forecast growth of an existing system, rather than trying
to estimate the size of a new system. But you can use it to estimate the size of a new

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.

NDST.fob contains these 8 objects:

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.

The DB Sizing Card


All the functionality in the objects contained in NDST.fob can be run from Form 72005
“DB Sizing Card”:

From the Functions button, you have access to a number of functions:

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).

Delete all versions:


Deletes all versions (all snapshots) and clears the form.

Import SQL Snapshot:


This is another way of creating a snapshot. It only applies to the SQL option, and it gives
you a bit more information compared to the “Create Snapshot” function. Note that with
the SQL option, you have the choice between using “Create Snapshot”, or “Import SQL
Snapshot”. But only compare like for like! The “Import SQL Snapshot” function shows
space used split into Data and Indexes, where as the “Create Snapshot” function shows
Data and Indexes as one field. So if you compare a version created by “Create Snapshot”
with a version created by “Import SQL Snapshot”, the result is unpredictable.
The advantage of this function compared to “Create Snapshot” are:
1) You get separate values for Database space used by Data and for indexes
2) You get individual results for the SIFT tables. For example: “Create Snapshot” will
create one record for table 17 G/L Entry. This record has the accumulated values
from tables G/L Entry and it’s two SIFT Tables 17$0 and 17$1. “Import SQL
Snapshot” will create three individual records – one for each SQL table.
To run “Import SQL Snapshot”, you first need to run a SQL query from Query Analyzer:
Open Query Analyzer. Log in, and select your Navision database, then open the script

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

Appendix A – Quick start tutorials

Tutorial 1 – Estimate how big a new Navision database will be.

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):

Database Version (Native or SQL) Native

Number of records in base tables:


Customer 900
Vendor 100
Item 250
Contact 900
Other 1
Other 2
Other 3
Other 4
Other 5
Other 6

Number of orders: 3650


Number of lines Pr. Order: 8
Number of dimensions: 3

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:

Select the latest version of Office available on the list.


Then, under classes select the corresponding class for each of the variables:
XApp .Application
XBook ._Workbook
XSheet ._Worksheet
xRange .Range
Note – for Workbook and Worksheet, select the ones preceded with an underscore.

3) Compile the codeunit, save and close it.

Appendix C – Discussion of factors that affect database growth

As mentioned previously in this document, a large number of customer specific factors


will affect the pace at which the customer’s database grows.
This means, that the results you get from DBSizingWorksheet.xls must be taken with
some caution. This appendix will discuss some of the most likely factors, and give
guidelines how to deal with them.

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.

Use NDST to make customer specific estimates:


There is only one way to find out exactly how much any particular action (e.g. posting an
order) will affect a database, and that is by running that action, then see what happened.
This is one of the things that NSDT can do (see the section “The DB Sizing Card”).

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.

Typical factors that will affect database growth:


Apart from the most obvious factors, such as having the contact table synchronized with
the customer table, a number of other typical but less obvious factors will have an effect
on database growth:

Number of posting groups:


Posting an order will create two G/L Entries pr. Combination of Gen. Business Posting
Group and Gen. Product Posting Group plus one balancing entry. If, for example you post
an order with two items which belong to separate Gen. Product Posting Groups, Navision
will create 5 G/L Entries.

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

You might also like