- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
What is CLUSTERED INDEX in DB2? Explain with the help of practical example.
In a CLUSTERED INDEX of a DB2 table, the data rows (table rows) with the similar index keys are stored in the same page. For example, If we have 4 index keys - T5623, T5611, Z9786 and Z9078. So the data rows with similar keys T5623 and T5611 will be stored in the same page and other similar keys Z9786 and Z9078 will be stored together on the other page.
The Clustered index structure has 2 types of pages i.e., Index page and data page. The index page stores all the index key values and points to the data page so that entire row data can be extracted. For example, if there is a table with Index key as a random whole number - 2, 5, 7, 12, etc. Then the clustered index structure would look like below−
The first 3 levels are the index pages having the value of index key. The third level of index pages points to the data pages. The clustered index is used when we need to access the table randomly.
- Related Articles
- What is NON CLUSTERED INDEX in DB2? Explain with the help of practical example
- What are COLUMN functions in DB2? Explain with the help of an example
- What is a use of SQLWARN3 in a SQLCA? Explain with the help of a practical example?
- What is the difference between DB2 JOIN and UNION? Explain with the help of an example
- What is the use of the VALUE function in a DB2? Explain with the help of an example
- Explain the concept of DYNAMIC SQL in DB2 with the help of an example
- What is symbiotic relationship? Explain with the help of an example
- What is the purpose of COALESCE function? Explain with the help of an example.
- (a) What is meant by a contact force? Explain with the help of an example.(b) What is meant by a non-contact force? Explain with the help of an example.
- Difference between clustered index and non-clustered index in SQL server
- Difference Between Clustered and Non-clustered index
- What is Fixed-list SELECT? Give the syntax and explain with help of an example
- Explain join operations with the help of an example in DBMS
- Usage and example of Multi-index and Index-only access path in DB2
- What is Dobereiner’s law of triads? Explain with the help of one example of a Dobereiner’s triad.
