DBMS Seminar
DBMS Seminar
Indexing
Tanish.M
CSE-C ( II )
2127230501158
Indexing
Indexing is a technique or mechanism generally used to speed up
Index structure:
Advantages of Indexing
• Faster DataRetrieval: Indexing
improves query speed
• Efficient Sorting and Searching
• Reduces table space by storing just
pointers
• Supports Random Lookups
Disadvantages of Indexing
1. Increased Maintenance Overhead: When indexes are updated
often
Types:
1.Dense index
2.sparse index
Definition: A non-clustered index is separate from the data table and does not alter the physical order
C
of the data. It contains a copy of the indexed columns along with a pointer to the actual location of the
data in the table (row pointer). Non-clustered indexes allow quick searching by the indexed column but
do not rearrange the actual data.
NON clustered Index
Definition: A non-clustered index is separate from the data table and does not
alter the physical order of the data. It contains a copy of the indexed columns
along with a pointer to the actual location of the data in the table (row
pointer). Non-clustered indexes allow quick searching by the indexed column
but do not rearrange the actual data.
clustered Index
In a clustered index, the data rows are stored in the same order as the index, effectively
sorting the table based on the indexed column(s). Because of this, each table can have
only one clustered index, as there can only be one way to physically arrange the data.
Dense Index
The dense index contains an index record for every search key value in the data
file. It makes searching faster.
In this, the number of records in the index table is same as the number of records
in the main table.
It needs more space to store index record itself. The index records have the search
key and a pointer to the actual record on the disk.
sparse Index
IIn the data file, index record appears only for a few items. Each item points to a
block.
In this, instead of pointing to each record in the main table, the index points to
the records in the main table in a gap.