Build your professional network on facebook via our app Go to app
 
 
 
Industry : Technology Consulting Functional Area : Infrastructure
Activity:  7 comments  313 views  last activity : 07 06 2010 20:18:04 +0000
 Refer 13
Share
 
 
 
Like application design, database design is very critical to the scalability and performance of your SQL Server applications. And also like application design, if you don't do a good job in the first place, it is very hard and expensive to make changes after your application has gone into production. Here are some key things to keep in mind when designing SQL Server databases for scalability and performance.

As always, you will want to test your design as early as possible using realistic data. This means you will need to develop prototype databases with sample data, and test the design using the type of activity you expect to see in the database once production starts.

One of the first design decisions you must make is whether the database will be used for OLTP or OLAP. Notice that I said "or". One of the biggest mistakes you can make when designing a database is to try to meet the needs of both OLTP and OLAP. These two types of applications are mutually exclusive in you are interested in any sense of high performance and scalability.

OLTP databases are generally highly normalized, helping to reduce the amount of data that has to be stored. The less data you store, the less I/O SQL Server will have to perform, and the faster database access will be. Transactions are also kept as short as possible in order to reduce locking conflicts. And last of all, indexing is generally minimized to reduce the overhead of high levels of INSERTs, UPDATEs, and DELETEs.

OLAP databases, on the other hand, are highly de-normalized. In addition, transactions are not used, and because the database is read-only, record locking is not an issue. And of course, heavy indexing is used in order to meet the wide variety of reporting needs.

As you can see, OLTP and OLAP databases serve two completely different purposes, and it is virtually impossible to design a database to handle both needs. While OLAP database design is out of this book's scope, I do want to mention a couple of performance-related suggestions in regard to OLTP database design.


When you go through the normalization process when designing your OLTP databases, your initial goal should be to fully normalize it according to the three general principles of normalization. The next step is to perform some preliminary performance testing, especially if you foresee having to perform joins on four or more tables at a time. Be sure to test using realistic sample data.

If performance is acceptable, then don't worry about having to join four or more tables in a query. But if performance is not acceptable, then you may want to do some selective de-normalization of the tables involved in order to reduce the number of joins used in the query, and to speed performance.

It is much easier to catch a problem in the early database design stage, rather than after the finished application has been rolled out. De-normalization of tables after the application is complete is nearly impossible. One word of warning. Don't be tempted to de-normalize your database without thorough testing. It is very hard to deduce logically what de-normalization will do to performance. Only through realistic testing can you know for sure if de-normalization will gain you anything in regards to performance.

 Top Comment : Manoj    | 04 07 2009 04:30:43 +0000
Manish, Excellant write-up on optimization, in fact we are pioneered in the optimization area be it MS SQL or Oracle. For an improved performance, one should look at the application tuning too apart from the database.
 
7 comments on "How to Optimize Your Database's Design"
  Commented by  Radhakrishna Marar, Business Analyst, Oracle    | 04 08 2009 08:17:59 +0000
Rating : +1 
Mr.Manish this is a very informative article but could you please tell whether it helps to reduce the number of columns in tables, which means that more rows can fit on a single data page, which helps to boost SQL Server read performance and also does it helps to maximize the use of clustered indexes, the most powerful and useful type of index available to SQL Server because the more data that is separated into multiple tables because of normalization, the more clustered indexes that become available to help speed up data access. 

hope to get a quick response from you.
  Commented by  Manoj, Branch Manager/Regional Manager Path Infotech Ltd    | 04 07 2009 04:30:43 +0000
Rating : +1 
Manish,

Excellant write-up on optimization, in fact we are pioneered in the optimization area be it MS SQL or Oracle. For an improved performance, one should look at the application tuning too apart from the database.
  Commented by  Sudeep Tarafdar, Senior Consultant, IBM    | 04 01 2009 10:51:27 +0000
Mr.Manish K. i am sure that this article will be of interest to all the IT guys.
so keep posting informative articles like this in the future also.
  Commented by  varsha mishra, Analytical Chemistry Manager, rfrac    | 10 27 2008 18:01:12 +0000
good article....
  Commented by  sridhar a, Business Analyst, Shriram value services    | 08 04 2008 00:13:10 +0000
good
  Commented by  Mahendra Sharma, Software Developer, SRM Techsol Pvt. Ltd.    | 08 01 2008 00:58:30 +0000
Good
  Commented by  Samir Nigam, Sr. Software Engineer , SRM TECHSOL Pvt. Ltd.    | 07 28 2008 05:02:43 +0000
nice.
Add your comment on "How to Optimize Your Database's Design"

Rate:
Submit
Leading Recruitment Firm
  • Create a confidential Career Profile and Resume/C.V. online
  • Get advice for planning their career and for marketing of experience and skills
  • Maximize awareness of and access to the best career opportunities
Viewers also viewed
Yes Job Satisfaction is more important vs Finally Money moves everything
 
44 referals 19 arguments, 764 views
Criminals and Politicians vs Common Public
 
0 referals 7 arguments, 83 views
Dear friends, construction industry is growing rapidly in India. Many are speaking about green...
 
0 referals 4 answers, 442 views
more...  
Recent Knowledge (108)
Office Etiquette or Office Manners is about conducting yourself   respectfully and courteously  ...
 
49 referals 4 comments, 73 views
In many ways, a manager has to be a leader, so therefore a manager will have many of the traits...
 
58 referals 24 comments, 319 views
Accounting of revenues costs in Entertainment Ind. 13 May 2010 2,927 views No Comment   A common...
 
0 referals 1 comments, 286 views
more...  
More From Author
Managing a project is. right work by right people on right time,
Like application design, database design is very critical to the scalability and performance of your SQL Server applications. And also like application design, if you don't do a good job in the first place, it is very hard and expensive to make...
How to configure Database Mirroring I have configured database mirroring with database sansu as the principal and with following 3 instances namely, Manish --- Principal Manish\Sansu --- Mirror Manish\Test --- Monitor I have drafted the following...
more...