---
title: "7 DB2 Helpful Questions And Answers"
description: "Here are helpful DB2 questions and answers"
url: https://srinimf.com/2014/05/18/ibm-db2-zos-questions-and-answers/
date: 2014-05-18
modified: 2026-10-10
author: "Srini"
image: https://i0.wp.com/srinimf.com/wp-content/uploads/2014/05/pexels-photo-1586996.jpeg?fit=1880%2C1255&ssl=1
categories: ["DB2"]
tags: ["DB2 Interview Questions"]
type: post
lang: en
---

# 7 DB2 Helpful Questions And Answers

Here are the selected questions with answers on DB2.

## Questions

1.Why do we have indexes?

A). Indexes can be used to enforce uniqueness of keys. Indexes are mainly created to improve SQL performance

2. What’s the cost of indexes ?

A). Indexes consume a lot of disk space (DASD). An index adds ~30% of CPU on INSERTs / DELETEs

3. [DB2 v10](https://srinimf.com/2014/02/01/db2-10-certification/) new feature?

A).ALTER INDEX IX ADD INCLUDE (COL)

4. What is it good for ?

A). The new INCLUDE feature in DB2 v10 allows you to
reduce the number of indexes, it means: Cost savings in DASD and Cost savings in CPU

5. How to locate this scenario in your DB2 environment ?

A). Query the system catalog to locate indexes whose keys overlap with the unique index !

6) Another DB2 v10 new feature?

A). improves the performance of applications accessing
LOB data, (reduces the need to access the auxiliary LOB Table Space) enables the creation of expression-based indexes on the inline portion of a LOB column (improves performance of searches through a LOB column)
the Inline portion of the LOB can be compressed

7) Where Stored procedures will be stored ?

```
A).SELECT CREATED BY,OWNER,NAME,ORIGIN,
CREATEDTS
FROM SYSIBM.SYSROUTINES
WHERE ORIGIN = 'N'
AND CREATEDTS < ( SELECT
CREATEDTS
FROM SYSIBM.SYSTABLES
WHERE NAME = 'SYSAUTOALERTS'
AND CREATOR = 'SYSIBM' );
```

Stored procedures are listed in SYSIBM.SYSROUTINES,
and the column ORIGIN = ‘N’ indicates that we deals with a Native SQL Procedure.

Related

- [Here’s Hash Index Real Purpose in DB2](https://srinimf.com/2014/12/05/db2-hash-index-functionality/)DateDecember 5, 2014
- [DB2- V10.5 SQL Enhancements](https://srinimf.com/2013/11/24/db2-v10-5-sql-enhancements/)DateNovember 24, 2013
- [DB2 V10-New Access Method~Hashing (1 of 2)](https://srinimf.com/2013/04/12/db2-v10-new-access-method-hashing-1-of-2/)DateApril 12, 2013

### 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%2F2014%2F05%2F18%2Fibm-db2-zos-questions-and-answers%2F&media=https%3A%2F%2Fi0.wp.com%2Fsrinimf.com%2Fwp-content%2Fuploads%2F2014%2F05%2Fpexels-photo-1586996.jpeg%3Ffit%3D1200%252C801%26ssl%3D1&description=7%20DB2%20Helpful%20Questions%20And%20Answers)
-
- [Share on Tumblr](https://www.tumblr.com/share)
- [Share on WhatsApp (Opens in new window) WhatsApp](https://srinimf.com/2014/05/18/ibm-db2-zos-questions-and-answers/?share=jetpack-whatsapp)
- [More](#)
-

- [Print (Opens in new window) Print](https://srinimf.com/2014/05/18/ibm-db2-zos-questions-and-answers/?share=print)
- [Share on Reddit (Opens in new window) Reddit](https://srinimf.com/2014/05/18/ibm-db2-zos-questions-and-answers/?share=reddit)
- [Share on Telegram (Opens in new window) Telegram](https://srinimf.com/2014/05/18/ibm-db2-zos-questions-and-answers/?share=telegram)
- [Email a link to a friend (Opens in new window) Email](mailto:?subject=%5BShared%20Post%5D%207%20DB2%20Helpful%20Questions%20And%20Answers&body=https%3A%2F%2Fsrinimf.com%2F2014%2F05%2F18%2Fibm-db2-zos-questions-and-answers%2F&share=email)
-

### Like this:

Like Loading…