SQL Server's performance can be affected by using NULLS in your database


Interview questions

SQL Server - using NULLS in your database

Next>>         SQL Server tutorial  

SQL Server - using NULLS in your database - Feb 27, 2010 at 11:50 AM by Shuchi Gauri

SQL Server's performance can be affected by using NULLS in your database. Explain how.

If there is a table having a fixed column length of 255 char, and the user stores a NULL value in it, the database will still use the 255 char. This accumulates to a lot of wastage of space which will cause SQL Server to perform extra I/O operations to read data pages. This wastes space even in data cache buffer, resulting in poor performance of SQL Server. Thus, it is much more efficient to store chars like N/A instead of NULL.

SQL Server - using NULLS in your database - May 05, 2009 at 22:00 PM by Rajmeet Ghai

SQL Server's performance can be affected by using NULLS in your database. Explain how.

NULL values in the database for a column particularly cause problems in searching and comparison. Query processing for NULL value columns is an overhead because their values are unknown.

SQL Server - using NULLS in your database - June 21, 2009 at 09:00 AM by Amit Satpute

NULLS that appear in fixed length columns (CHAR) take up the entire size of the column. This added space increases the size of your database, which in turn means that it takes more I/O overhead to find the data you are looking for.

Index cannot be used for a query in which the IS NULL clause is used in the WHERE clause and so the table scans need to be performed which reduces the performance greatly.


Also read

What is the significance of NULL value and why should we avoid permitting null values?

Null means no entry has been made. It implies that the value is either unknown or undefined.............


SQL NOT NULL: The NOT NULL constraint enforces a column to NOT accept NULL values..............

What are the advantages of using Stored Procedures?

Answer - Stored procedures provide performance benefits through local storage, precompiling the code, and caching......

Describe in brief SQL Server monitoring ways.

Answer - SQL Profiler is a tool that stores events from the server. SQL Profiler saves the events in the trace file......

SQL Server Optimization Tips

Answer - Restricting query result means return of required rows instead of all rows of the table. This helps in reducing network traffic......

Write your comment - Share Knowledge and Experience


Latest placement tests
Latest links
Latest MCQs
» General awareness - Banking » ASP.NET » PL/SQL » Mechanical Engineering
» IAS Prelims GS » Java » Programming Language » Electrical Engineering
» English » C++ » Software Engineering » Electronic Engineering
» Quantitative Aptitude » Oracle » English » Finance
Home | About us | Sitemap | Contact us | We are hiring