摘要:
Why use CTE: Improve code readability Breaking up complex queries into smaller blocks Execution Scope: Don’t use “Go” keyword between CTE and the reference query, only the query that followi... 阅读全文
摘要:
By using CHECKSUM and CHECKSUM_AGG function in SQL Server, we could easily notice that if anything has changed or not. -- Check Row:SELECT CHECKSUM(*) FROM TableFooWHERE ID = 1;-- Check Table:SELECT ... 阅读全文
摘要:
As we all know, In WPF or Silverlight application, if we want to update the value in the UI when the underlying data has changed, the class need to implement the "INotifyPropertyChanged” interface, which contains one delegate "PropertyChangedEventHandler”.So create a new method, and take t 阅读全文
摘要:
Recently, I start realize the benefits of TDD, it really could give me a chance to think about how others people gonna use my API, how should I design it. So normally, Create a falling test case firs... 阅读全文
摘要:
Here is a great article about this topic. http://www.sqlpointers.com/2006/11/parameter-sniffing-stored-procedures.html Basically, if you’re suffer from parameter sniffing, try to use local var... 阅读全文
摘要:
When ever you write any SQL statements, try to avoid use "IN", "NOT IN" keyword, even "EXISTS", "NOT EXISTS" Most of people think "EXISTS" is better than "IN", becuase it will use index, but the trut... 阅读全文
摘要:
If you install SQL server by following click next, next, next button, then you probably should read this.1. Make sure each SQL service has their own dedicate account.2. Choose OS Power Options to “Performance” type.3. Add SQL Service account to “Perform Volume Maintenance Tasks” (Before Install SQL 阅读全文
摘要:
As everybody may already know, Default Parameter is a new feature comes from .NET 4, but I would like to show some code snippets to demo how it works in overload method. So let’s start write some cod... 阅读全文
摘要:
Design Guidelines for Developing Class Libraries No.1 Keep classes size small. Large class trying to do too many things. Figure out responsibly, use delegation and collaborate small classes ... 阅读全文