Unused space on SQL Server

ouredp
Member Posts: 56
Hello,
Since december 2006 were are running Navision 4.0 SP1 on SQL Server2K.
We are facing a problem with the size of the database. It growes about 3 GB per day.
Looking at tables , somes strange infos appear:
Table 355 , Ledger Entry Dimension is about 22Gb with 1.7 Million rows,
SQL Server tells about 20 GB unused space !
Item ledger entry, ledger entry are facing the same problem. A database
schrink doesn´t reclaim that unused space.
Our database is now 82 GB large but starting a "navision backup" , the backup file has 1,2 GB.
We haven´t change anything in original settings.
Has anybody experienced that kind of situation ?
Since december 2006 were are running Navision 4.0 SP1 on SQL Server2K.
We are facing a problem with the size of the database. It growes about 3 GB per day.
Looking at tables , somes strange infos appear:
Table 355 , Ledger Entry Dimension is about 22Gb with 1.7 Million rows,
SQL Server tells about 20 GB unused space !
Item ledger entry, ledger entry are facing the same problem. A database
schrink doesn´t reclaim that unused space.
Our database is now 82 GB large but starting a "navision backup" , the backup file has 1,2 GB.
We haven´t change anything in original settings.
Has anybody experienced that kind of situation ?
0
Comments
-
ouredp wrote:Hello,
Since december 2006 were are running Navision 4.0 SP1 on SQL Server2K.
We are facing a problem with the size of the database. It growes about 3 GB per day.
Looking at tables , somes strange infos appear:
Table 355 , Ledger Entry Dimension is about 22Gb with 1.7 Million rows,
SQL Server tells about 20 GB unused space !
Item ledger entry, ledger entry are facing the same problem. A database
schrink doesn´t reclaim that unused space.
Our database is now 82 GB large but starting a "navision backup" , the backup file has 1,2 GB.
We haven´t change anything in original settings.
Has anybody experienced that kind of situation ?
What is the size of a transaction log?
3GB per day is huge increase, btw... in 1 year you'll have 1TB of data...0 -
1) How many dimensions you are using?
2) Which recovery model you are using? (File-Database-Alter-Options)0 -
The database is abnormally growing with 3Gb per day. We don´t have 3GB data increase.
The problem seems to be the unused space in the mdf file.
Database Recovery : Full
Transaction backup : every 6 hours , size about 400MB0 -
Can you check on which tables is the grow biggest?
How many dimensions you are using? (each dimension leads to big grow per posted line...)0 -
We are using 1 Global Dimension and 1 "non-global"
Following Tables are occupying huge amount of space
355Ledger Entry Dimension 1825466 rows 23.1 GB
5802 Value Entry 374142 rows 8.2 GB
17 G/L Entry 381637 rows 6.5 GB
32 Item Ledger Entry 271799 rows 6.3 GB
358 Production Document Dimension 546989 rows 5.5 GB
407 Prod. Order Component 285895 rows 4.4 GB0 -
Interesting. Count of records in T355 corresponds to count of records in Ledger entry tables.
But e.g. in our customers table we have:
T355 - 8763609 records = 1039280Kb ~ 1GB
T5802 - 3171786 records = 5524160Kb ~ 5,5GB
etc...
For me there is something wrong with defragmentation, indexes or fill factor.0 -
I would say there is an enormous number of secondary keys with lots of sumindexfields. You need to have your solution center look at optimizing your keys. If you get the impression that they don't know exactly what that means you should find an expert.0
-
Thanks for your advices
We have open a call at Microsoft support. I´ll let you know the result of
their investigations.
(but with defragmantation , indexes or fill factors I think you´re on the right side)
Is it usual in Navision to use clusterred indexes ?0 -
Clustered index is used for PK automatically. Since v4.00SP1 (or it was SP2?) you can select which index is clustered through new property on keys in NAV.0
-
ouredp wrote:Is it usual in Navision to use clusterred indexes ?
All Primary keys up until 4.0 Sp2 are setup as clustered. After sp2 you can change them to secondary keys.0 -
ara3n wrote:All Primary keys up until 4.0 Sp2 are setup as clustered. After sp2 you can change them to secondary keys.0
-
Yep that is true Denster, but we don't want to talk about bugs.
That's the first rule of navision.0 -
-
The excessive keys mentioned above could be your issue. Another possiblility is a problem with your database. It may be having a problem reallocating space freed up by deleted records.
Run a DBCC CheckDB on the database and look at the number of reported errors (should be 0).
If this returns no errors, then check the space usage on the tables you mentioned
Example
EXEC sp_spaceused 'CompanyName$Customer'
This will give you the space allocation between data and indexes.There are no bugs - only undocumented features.0 -
Your system needs both maintenance and tuning.
For maintenance you can use the SQL Perform maintenance tools. This will update statistics, reconfig fill factors, remove empty Sift, etc.
For analisys you can use SQL Perform analisys, this will also check your db for heaps (SP1 bug) and analyse which indexes and sift tables have the biggest impact on your database.
The installation is very easy and it gives you a huge jumpstart in your tuning.
The tuning of your database means carefully creating an index plan that is optimum for your company. Every company uses navision diferently, so every company needs their own index plan.
Good luck.0 -
Setting Clustered Indexes on the Top 10 Tables and schrinking the database solved the problem
Our DB has now 10 GB.
But we will go on with setting the CI and tuning the performance.
Thanks again to all of you.0 -
[Topic moved from Navision forum to SQL General forum]Regards,Alain Krikilion
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions