concept page in category sql

This is an excerpt from Manning's book SQL Server MVP Deep Dives Vol. 2.
DELETEs are quite a different story and hide a very risky aspect. Because the primary key value is ever increasing, the space left by a row that was deleted will never be reclaimed until the index is rebuilt or until the page is empty. This is not the case when using natural keys, which tend to have more or less even distribution patterns. Even if you choose to use artificial clustered keys, you’ll need to deal with the fragmentation effect of the natural keys anyway. As previously mentioned, their unique (nonclustered by default) indexes will be required to enforce data consistency and will suffer from the same fragmentation. It’s true that rebuilding a nonclustered index is cheaper in terms of locking and potential downtime. This brings me to the question of whether or not it’s a good idea to have the clustered index of the table on the primary key. Because in my opinion this issue deserves a full chapter by itself, I won’t address it here.
First, you need to specify that you want to perform a page-level restore (see figure 2). Then you have to specify the pages you want to restore and verify that backup set (see figure 3).
Once you’ve done that, click OK to restore the pages from the backup, restore all log backups, take the final log backup and restore that, leaving the pages online and available.
The Check Database Pages button allows you to ensure that the pages entered you entered are valid database pages.
Listing 3. Capturing the number of page reads per second with T-SQL
-- Collect first sample DECLARE @old_cntr_value INT; DECLARE @first_sample_date DATETIME; SELECT @old_cntr_value = cntr_value, @first_sample_date = getdate() FROM sys.dm_os_performance_counters WHERE counter_name = 'Page reads/sec'; -- Time frame to wait before collecting second sample WAITFOR DELAY '00:00:10'; -- Collect second sample and calculate per-second counter SELECT (cntr_value - @old_cntr_value) / DATEDIFF(ss,@first_sample_date, GETDATE()) as PageReadPerSec FROM sys.dm_os_performance_counters WHERE counter_name = 'Page reads/sec' AND object_name = CASE WHEN @@SERVICENAME = 'MSSQLSERVER' THEN 'SQLServer:Buffer Manager' ELSE 'MSSQL$' + rtrim(@@SERVICENAME) + ':Buffer Manager' END;