---
title: "DB2 INSERT’s Performance and What is Newly Added"
description: "In DB2, performance affects on the size of the index. When you create an index, it is useful to exclude one or more values from being indexed - such as values that will never be used in a SQL query...."
url: https://srinimf.com/2015/05/19/1-more-addition-to-improve-db2-insert-performance/
date: 2015-05-19
modified: 2026-10-10
author: "Srini"
image: https://i0.wp.com/srinimf.com/wp-content/uploads/2015/05/pexels-photo-3784567.jpeg?fit=1880%2C1253&ssl=1
categories: ["DB2"]
tags: ["SQL tips and tricks"]
type: post
lang: en
---

# DB2 INSERT’s Performance and What is Newly Added

In DB2, performance affects on the size of the index. When you create an index, it is useful to exclude one or more values from being indexed – such as values that will never be used in a SQL query. For example NULL, blank, and 0.

Related[DB2 V11 New Functions: Read Right Away](https://srinimf.com/2019/09/29/db2v11-top-built-in-functions-newly-added/)

## **Improvement in Performance**

DB2 11 NFM can improve insert performance of NULL entries by the option of excluding NULL rows from indexes.

The CREATE INDEX statement is changed to state **EXCLUDE NULL KEYS,** and the RUNSTATS utility collect statistics only on non-NULL value.

[**32 Complex SQL Queries**](https://srinimf.com/e-books/)

All table statistics derived from an index are adjusted by the number of excluded NULL values. Therefore the table statistics will be the same whether they were derived from a table scan, an EXCLUDE NULL KEYS index, or a non-EXCLUDE NULL KEYS index (or INCLUDE NULL KEYS index).

After converting existing indexes to EXCLUDE NULL indexes, monitor application performance. Insert performance should improve and query performance difference should be minimal.

Related post

- [DB2- V10.5 SQL Enhancements](https://srinimf.com/2013/11/24/db2-v10-5-sql-enhancements/)DateNovember 24, 2013
- [DB2 Utilities Performance: What’s New](https://srinimf.com/2022/08/28/db2-utilities-performance-5-improved-areas/)DateAugust 28, 2022
- [DB2 V11 Top New Features](https://srinimf.com/2014/01/31/db2-v11-zos-new-features/)DateJanuary 31, 2014

### Share this:

-
- [Tweet](https://twitter.com/share)
- [![](https://i0.wp.com/assets.pinterest.com/images/pidgets/pinit_fg_en_rect_gray_20.png)](https://www.pinterest.com/pin/create/link/?url=https%3A%2F%2Fsrinimf.com%2F2015%2F05%2F19%2F1-more-addition-to-improve-db2-insert-performance%2F&media=https%3A%2F%2Fi0.wp.com%2Fsrinimf.com%2Fwp-content%2Fuploads%2F2015%2F05%2Fpexels-photo-3784567.jpeg%3Ffit%3D1200%252C800%26ssl%3D1&description=%3Cstrong%3EDB2%20INSERT%27s%20Performance%20and%20What%20is%20Newly%20Added%3C%2Fstrong%3E)
-
- [Share on Tumblr](https://www.tumblr.com/share)
- [Share on WhatsApp (Opens in new window) WhatsApp](https://srinimf.com/2015/05/19/1-more-addition-to-improve-db2-insert-performance/?share=jetpack-whatsapp)
- [More](#)
-

- [Print (Opens in new window) Print](https://srinimf.com/2015/05/19/1-more-addition-to-improve-db2-insert-performance/?share=print)
- [Share on Reddit (Opens in new window) Reddit](https://srinimf.com/2015/05/19/1-more-addition-to-improve-db2-insert-performance/?share=reddit)
- [Share on Telegram (Opens in new window) Telegram](https://srinimf.com/2015/05/19/1-more-addition-to-improve-db2-insert-performance/?share=telegram)
- [Email a link to a friend (Opens in new window) Email](mailto:?subject=%5BShared%20Post%5D%20%3Cstrong%3EDB2%20INSERT%27s%20Performance%20and%20What%20is%20Newly%20Added%3C%2Fstrong%3E&body=https%3A%2F%2Fsrinimf.com%2F2015%2F05%2F19%2F1-more-addition-to-improve-db2-insert-performance%2F&share=email)
-

### Like this:

Like Loading…
