Showing posts with label SQL Server. Show all posts
Showing posts with label SQL Server. Show all posts

Wednesday, July 25, 2012

Advantages and Disadvantages of Entity Framework in .NET

The EF is essentially an O/R mapping tool. It takes care of object persistence for you. In other words, it acts as your data layer. writing applications using entity framework saves lot of development time and its good..if we are developing enterprise applications, we need to think about performance..all in all its good for small applications..

  1. Advantages : One common syntax ( LINQ / Yoda ) for all object queries whether it is database or not , Pretty fast if used as intended , easy to implement SoC , less coding required to accomplish complex tasks
    Disadvantages : you have to think in a non traditional way of handling data , not available for every database
  2. Disadvantage: If there is any schema change in database FE won’t work!!! You have to update the schema in solution as well!!!
    Advantage: Its fast and straight forward using LINQ/FE objects For Add/Modify/Delete/Update.
  3. Advantages:-Easy to map business objects (with drag & drop tables on environment).
    -It keeps a good performance when you work with a small / middle domain model.
    Disadvantages:-It's limited when you work with a huge domain model.
    -Scalability.

Wednesday, April 18, 2012

Maximum SharePoint Content DB Capacity

100GB is not the limit, its actually a best practise. This post lists out few suggestions. The following represents Microsoft's guidance and best practices on content databases, as specified in various places on technet.microsoft.com:

  1. Limit the content database size to 100GB; use multiple content databases if necessary.
  2. Create multiple data files and spread them across multiple disks; only create files in the primary file group.
  3. The number of data files should be less than or equal to the number of core CPUs; count dual core processors as two CPUs; count each processor that supports hyper-threading as one CPU.

Friday, April 6, 2012

TIPS - Increase SQL Server stored procedure performance

a) Define / Use of variables within stored procedure

b) Use of uncommon values in parameter values on the first execution after a stored proc is created/recompiled, resulting in a bad query plan chosen by the optimizer.

c) Join order. What's an inner and outer table. What is nested join and/or merge join. And understand how the optimizer chooses the join order.

Thursday, April 5, 2012

User Defined Functions and Stored Procedures

  1. UDF are simpler to invoke than Stored Procedures from inside another SQL statement. They are Complex to Invoke.
  2. SQL functions that return non-deterministic values are not allowed to be called from inside User Defined Functions. GETDATE is an example of a non-deterministic function. Every time the function is called, a different value is returned. Therefore, GETDATE cannot be called from inside a UDF you create, but could not be used inside the function itself. Non-deterministic values are not allowed to be called from inside Stored Procedure.
  3. The User Defined Function must be prefaced with the owner name, DBO in this case. Not mandatory.