Download presentation
Presentation is loading. Please wait.
Published byValerie Eaton Modified over 9 years ago
1
Page 1 SQL Server Myths XV ENCONTRO DA COMUNIDADE SQLPORT Rui Ribeiro MCITP 2011/08/16
2
Page 2 SQL Server Myths An index FILLFACTOR is NOT used by regular DML operations –True or False ?
3
Page 3 SQL Server Myths An index FILLFACTOR is NOT used by regular DML operations - True ! From Books Online: “Important: The fill-factor setting applies only when the index is created, or rebuilt. The SQL Server Database Engine does not dynamically keep the specified percentage of empty space in the pages. Trying to maintain the extra space on the data pages would defeat the purpose of fill factor because the Database Engine would have to perform page splits to maintain the percentage of free space specified by the fill factor on each page as data is entered.”
4
Page 4 SQL Server Myths Once a backup completes, YOU CAN safely delete the previous one ! –True or False ?
5
Page 5 SQL Server Myths Once a backup completes, YOU CAN safely delete the previous one ! –False ! “If you go to restore, and you find your full backup is corrupt, what do you do? Well, if you don't have an older full backup, you most likely start updating your resume. You need to keep a rolling-window of backups around in case a disaster occurs and you need to restore from an older set of backups.”
6
Page 6 SQL Server Myths Log backups ALWAYS clear the log ! –True or False ?
7
Page 7 SQL Server Myths Log backups ALWAYS clear the log ! –False ! “If there's no concurrent data backup running, a log backup will always try to clear the log, and only succeed in clearing the inactive portion of the log - the log that's only considered 'required' by SQL Server because it hasn't yet been backed up. If anything else is holding the log 'required', it cannot be cleared, even though it has been backed up. Subsequent log backups will check again and again until the time comes when that portion of the log can be cleared.”
8
Page 8 SQL Server Myths Data type of a table IS NOT a key criteria while doing query tuning ! –True or False ?
9
Page 9 SQL Server Myths Data type of a table IS NOT a key criteria while doing query tuning ! –False ! “Data types decide how many rows can fit into a page. A wrong data type may consume 1000’s of excess data pages. This will directly affect IO. A simple char(100) can do this. Be cautious in choosing data types.”
10
Page 10 SQL Server Myths NULL won’t occupy space in SQL Server ! –True or False ?
11
Page 11 SQL Server Myths NULL won’t occupy space in SQL Server ! - Depends... (True & False...) “Yes for Variable length columns and No for Fixed length columns You can create a table with nullable fixed & variable length columns and check PAGE content.”
12
Page 12 SQL Server Myths Log backups WILL BE the size of the log ! –True or False ?
13
Page 13 SQL Server Myths Log backups WILL BE the size of the log ! –False ? “The log has to accommodate the space necessary to roll back active transactions, the amount of space returned by DBCC SQLPERF (LOGSPACE) on a busy system doesn't accurately reflect the amount of log records in the log. (…) And apart from that, a log backup is just all the log generated since the last log backup - not the whole log file usually - and if it happens to be, the first part of the explanation comes into play.”
14
Page 14 SQL Server Myths If the backup works, the restore WILL too! –True or False ?
15
Page 15 SQL Server Myths If the backup works, the restore WILL too! –False ! “Please don't fall into this trap. You must regularly validate your backups to give yourself a high level of confidence that they will work if a disaster occurs.”
16
Page 16 SQL Server Myths Truncate CANNOT be rolled back because it’s not a fully logged and only page deallocations is recorded ! –True or False ?
17
Page 17 SQL Server Myths Truncate CANNOT be rolled back because it’s not a fully logged and only page deallocations is recorded ! –False ! “You can rollback data from TRUNCATE IF surrounded by a transaction and session is not closed.”
18
Page 18 SQL Server Myths QUESTIONS ?
19
Page 19 SQL Server Myths References: –http://www.sqlservercentral.com/blogs/livi ngforsqlserver/archive/2011/06/28/my- favourite-sql-server-myths-and- realities.aspx –http://www.sqlskills.com/blogs/paul/Comm onSQLServerMyths.pdf
20
Page 20 SQL Server Myths
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.