TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
C# Corner
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Best Practices For Better SQL Database Performance
Anu V
Dec 01, 2016
6.2
k
0
6
facebook
twitter
linkedIn
Reddit
WhatsApp
Email
Bookmark
In this blog, you will learn about the best practices for better SQL database performance.
Store relevant and necessary information in the database instead of an application structure or an array.
Use normalized tables in the database. Small multiple tables are usually better than one large table.
If you use any enumerated field to create look up for it in the database itself then maintain the database.
Keep primary key of lesser chars or integers. It is easier to process small width keys.
Store image paths or URLs in the database instead of the images. It has less overhead.
Use proper database types for the fields. If StartDate is the database, use date time as datatypes instead of VARCHAR (20).
Specify the column names instead of using * in SELECT statement.
Use LIKE clause properly. If you are looking for an exact match, use “=” instead.
Write SQL keyword in the capital letters for readability purposes.
Using JOIN is better for performance than using sub queries or the nested queries.
Use the stored procedures. They are faster and help in maintainability as well as security of the database.
The user comments for readability as well as guidelines for the next developer, who comes to modify the same code. Proper documentation of an Application will also help.
Proper indexing will improve the speed of operations in the database.
Make sure to test any of the database programming as well administrative changes.
SQL Database Performance
SQL Server
Next Recommended Reading
Insert Values from One Database Table to Another Database Table in SQL Server