Peter Larsson Blog

Patron Saint of Lost Yaks

Index pages

SQL Server 2005 introduced the new DMV views. They are great and a real improvement to debug and optimize queries. I find sys.dm_db_index_physical_stats very useful and often write this type of code Read more →

Finding table reference levels and simulating cascading deletes

I worked with this topic recent weekend and posted the final functions here http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=97454 The general idea is to have a generic purge functionality. Legacy Comments Jason 2008-02-16 re: Finding table reference levels and simulating cascading deletes I understand why some people might want this, but I think it is truly a bad idea to even do something like this. Read more →

SQL Server 2005 too smart?

I was involved in a discussion today about the ISNUMERIC() function Someone proposed a nested solution like this SELECT Column_Name from ( SELECT Column_Name FROM ( select 'staff' as Column_Name union all select '234000' as Column_Name union all select '12d1' as Column_Name union all select '45e0' as Column_Name union all select '$123. Read more →