Posts

Showing posts from March, 2016

CLR Performance Checker

CLR Profiler https://player.vimeo.com/video/51588869 http://www.codeproject.com/Articles/42721/Best-Practices-No-Detecting-NET-application-memo
Static Class  * Only 1 instance of the object is created for static classes * Static class Should be declare static keyword for declare constructor or method or variable * Can't specify access specifier for static Constructor * Static constructor should run only once. Example          public static class MyClass         {             static MyClass()             {                 Console .WriteLine( "Static Constructor" );             }             public static void SomeMethod()             {         ...

SQL Cursor

SQL Cursor Let me say one thing: DON'T use cursors. They should be your preferred way of killing the performance of an entire system. Most beginners use cursors and don't realize the performance hit they have. They use memory; they lock tables in weird ways, and they are slow. Worst of all, they defeat most of the performance optimization your DBA can do. Did you know that every FETCH being executed has about the same performance of executing a SELECT? This means that if your cursor has 10,000 records, it will execute about 10,000 SELECTs! If you can do this in a couple of SELECT, UPDATE or DELETE, it will be much faster. Beginner SQL programmers find in cursors a comfortable and familiar way of coding. Well, unfortunately this lead to bad performance. The whole purpose of SQL is specifying what you want, not how it should be done. I've once rewritten a cursor-based stored procedure and substituted some code for a pair of traditional SQL queries. The table had only...

Indexing and Pagenation in SQL

Indexing              An index can be created in a table to increase the performance of application and we can get the data more quickly and efficiently              Let’s see an example to illustrate this point suppose now we are reading book in that I need to check the information for  dbmanagement  to get this information I need to search each page of the book because I don’t know in which page that word information exists it’s time taken process. Instead of reading the each page of book to get that particular word information if I check the index of book (Glossary) it is much quicker for us to get the pages which contains the information with  dbmanagement  word. By using second method we can save lot of time and we can get information in efficient way. Example of creating SQL Index on multiple columns CREATE   INDEX  SampleIndex  ON  UserInformation   ( ...