multiple database files on SQL
Ostry
Member Posts: 5
Hello,
I have a question. I have 30 GB database on SQL2005 on 6 hdds RAID 10
Should I partition ndf file for two?
I have a question. I have 30 GB database on SQL2005 on 6 hdds RAID 10
Should I partition ndf file for two?
0
Comments
-
You can add another file (in general named xxx.mdf, but the extension is optional). If you add another file, SQL will use it and some data will be in the primary file (.ndf) and some in othe files. You can create as many files as you want.0
-
You don't have to at 30GB though, SQL Server is perfectly capable to handle a 30GB file.0
-
I have read that for performance it MIGHT be better to have multiple files on the same (physical) disks. This because SQL can use multiple threads (1 per file) to access them and this might give an a extra for performance.
But if you already are at 100% of disk activity, this will not help.
I have been thinking about this statement for some time and I think this extra boost for performance is minimal (if existing). My experience is that when performance is low, the disks are already at 100% activity.
An extra problem is that when you multiple files on 1 (physical) disk, you might get some fragmentation because those files increase in size, so you would need to defrag them otherwise you LOSE performance.
Conclusion : to make a long story short : I think it is better to keep 1 big file then multiple smaller ones. The extra performance for multiple files is too small to be worth the extra administrating of them.Regards,Alain Krikilion
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!0 -
But at 30GB that is not going to make a big difference, unless there is a hardware issue.0
-
Hi!
Well, it is true that SQL Server handles multiple files with sparate Threads. This generally increases performance as the CPU are used more efficient. But on the other hand - as you said - multiple files would also increase the I/O on the disks.
In my opinion it makes no sense to have multiple files of the same Filergoup - like "PRIMARY" or "Data Filegroup 1", execpt if you could store each file on a dedicated (physical) disk/array to benefit from dedicated I/O.
As far as I know, SQL Server would not "splitt" data of one table into separate files of the same group. Hence, when writing table data in NAV, this would be handled in one single thread anyway.
But it makes sense to have e.g. separate file-groups for Indexes and/or SIFT tables, even though if those are located on the same physical disk - just to benefit from the "multi-threading":
One write transaction in NAV - e.g. T32 - triggers write transactions on indexes and SIFt tables, so this could be handled with multiple parallel threads!
Kind regards,
JörgJörg A. Stryk (MVP - Dynamics NAV)
NAV/SQL Performance Optimization & Troubleshooting
STRYK System Improvement
The Blog - The Book - The Tool0 -
One word of caution about parallel queries is that this has been known to cause deadlocks itself during SIFT updates, where two threads conflict with eachother. We recommend not using parallelism during daily NAV processing. NAV sends multipler queries to SQL Server for the same transaction. Having those be processed by multiple threads can cause problems in itself.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
- 322 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

