Someone told me that doing table Optimization with Navision Client is better than using SQL 2005 Rebuild Index task.
Is this true? :-k I hope not, because the client optimization cannot be Scheduled to night hours
How often should the rebuild index used?
Thanks
0
Comments
Not sure the answers to some of th questions posted here, but I do remember starting a post way back on mbsonline.org about Table optimization and If it was necessary? and if so, How Often?
I think the feelings were mixed that there is an actual gain in performance or not. I forgot if it was the reading got faster and the writing got slower or vice versa.
I guess other can chime in on that. I mainly do it for space once in a while. Any here's a post from the Tip's N' Tricks forum about Optimizing from Ara3n, so it possible!:
Optimizing Tables in Job Scheduler
http://www.mibuso.com/forum/viewtopic.php?t=10331
http://www.BiloBeauty.com
http://www.autismspeaks.org
1) Delete "Zero" SIFT Entries
2) Rebuild Indexes doing a CREATE INDEX ... WITH DROP_EXISTING
The Standard MP can not delete the SIFT stuff, except if you include e.g. my stored procedure for this: http://www.stryk.info/ssi_delzerosift.zip
The CREATE INDEX thing is actually the hard way to rebuild indexes; while it is running the table is actually offline.
The MP uses the ALTER INDEX command which is a "smoother" way of defragmenting indexes; and with EE you could do it in an ONLINE mode!
The result (restauration of Fillfactors, Defragmentation of Indexes) of both methods is pretty much alike.
Of course, if you really measure the fragementaion usind DBCC SHOWCONTIG you would find differences, maybe the CREATE slightly better; but for the experienced performance it does not matter.
So, I recommend to stick to the MP!
Best regards,
Jörg
NAV/SQL Performance Optimization & Troubleshooting
STRYK System Improvement
The Blog - The Book - The Tool
MP = ?Maintenace plan?
Just to be sure I got it right! You're saying to keep a standard Maintenace plan that rebuilds de index, since there's no major performance differences? :?:
Another thing bother's me. My SQL is with Option Full and the log does not stop to grow, this forces me to sometimes put it in SIMPLE and clean the log file. I bet there's better way, please advice me!!
Best regards,
Rui
Independent Consultant/Developer
blog: https://dynamicsuser.net/nav/b/ara3n
Before shrinking your log files you should know you acreage log file size. You shouldn’t decrease your log files to a minimum size. Besides rebuilding indexes you periodically delete zero entries in SIFT tables with script supplied by stryk.
Freelance Dynamics AX
Blog : http://axnmaia.wordpress.com/
If you do a daily backup of the log files (or even more frequently), the log file does not become smaller in size, but the space inside the file will be reused.
Log file will automatically expand. This will take time and will take time when people are working.
Constantly shrinking and expanding the log file will cause a lot of defragmentation.....
In a normal working environment the size of the log file should stay aprox. the same, so why shrink it as it later in the day will expand again....
Rgds
Benny
Benny Giebens
MP: in the maintenance plan on sql2005 you have the option to keep the index online will rebuilding.
LOG file: besides a backup of data you MUST also do a backup of the log file, otherwise the log keeps growing. After a backup the size will not be smaller but the space inside the logfile will be reused!!
Benny Giebens
<edit> I should really read the whole thread before replying, someone had already made the point :oops: </edit>
RIS Plus, LLC
RIS Plus, LLC
PS - I've searched the forum and steel I haven't seen an answer that really states what's the best practice, related to Index and Log size.
Waht to do with SQL maintenace for NAV.
Freelance Dynamics AX
Blog : http://axnmaia.wordpress.com/
RIS Plus, LLC
Regarding the TLog size: the optimal size of the TLog is so that it is never necessary to expand it (Log Growth = new Virtual Log = more administartion = slower performance) but should not waste too much of disk space, also.
To grant this it is necessary to truncate the TLog space by frequent backups, and this depends on your backup strategy and available disk space.
The big advantage of TLog backups is, that with them you could restore a system - in case of disaster recovery - until the very last committed transaction! So running the SIMPLE recovery model would be a waste of this big benefit! FULL is the only option for a productive NAV database.
When it comes to rebuilding the indexes, the TLog wil be used more than usual; e.g. if your DB size is 50GB, a normal TLog size could be 3GB. After re-indexing it could be grown to 55 GB!
So assuming the index maintenance is performed one per week - at the weekend - the process could look like this:
- Normal TLog size during week: 3GB
- Friday, 20:00, End Of Business; Full Backup
- Friday, 21:00: Set Recovery Model to SIMPLE
Run Re-Indexing
If necessary SHRINK TLog to 3GB
Set Recovery Model to FULL
- Saturday, 12:00: Full Backup
With SQL Server 2005 Maintenance Plan this all could be perfectly designed, mixing standard tasks with own TSQL tasks etc.!
NAV/SQL Performance Optimization & Troubleshooting
STRYK System Improvement
The Blog - The Book - The Tool
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!