Final Group-Orcl
Final Group-Orcl
GROUP MEMBERS:
LÊ NHẬT BẰNG – B2205974
HUỲNH TÚ PHƯƠNG – B2206005
ĐẶNG NHẬT TƯỜNG – B2206021
LÂM THẾ VINH – B2206022
CONTENTS
01 DEFINITION
TYPES OF INDEX IN
02 ORACLE
Demonstrating the
03
Effect of Indexes
DEFINITION
Descending indexes
B-tree clustered indexes
B-Tree Index
Definition:
• A B-Tree (Balanced Tree) index is a type of data structure that maintains
sorted data in a way that allows for efficient insertion, deletion, and lookups.
• In Oracle, B-Tree indexes are implemented to optimize the retrieval of rows by
providing a fast path to the data stored in tables.
Structure:
• Internal Nodes: These nodes contain pointers to child nodes and keys that help
determine which branch of the tree to follow.
• Leaf Nodes: These nodes contain the actual indexed values (keys) and pointers
to the rows in the base table where the corresponding data resides.
Branch
Blocks
Leaf
Blocks
B-Tree Index
Use case
• A B-Tree index enhances database search performance by enabling quick
lookups on specific columns and reducing full table scans.
QUERY
Function-Based Index
Definition
• It is an index that calculates the result of a function involving one or more table
columns (an arithmetic expression, an SQL function, a PL/SQL function, or a
package function).
Use case
• Allows indexing on expressions or functions, which can improve performance for
queries involving those expressions.
Structure:
• Bitmap indexes use bitmaps (arrays of bits) to represent the presence of a value
in a column. Each bit in the bitmap corresponds to a row in the table.
Use Cases:
• Bitmap indexes are particularly effective for columns with low cardinality (few
distinct values), such as gender or status fields.
Bitmap Index
QUERY
Domain Index
Definition
• An application domain index is custom to a specific application. This
accommodates indexes on custom data types, documents images, video, and
spatial data.
Use case
• When you need to optimize searches for specialized data not supported by default
indexes.
Result:
Before using an index, the CPU cost
for the query was 1713. Time is 21s
Test with Index Create
index
Result:
After using an index, the CPU cost
for the query was drop 4. Time is 1s
CONCLUSION
This report highlights the significant impact of using indexes on
optimizing data queries in Oracle. Key observations include:
Impact of Indexes
Query Performance
Optimization Considerations
Recommendations
Future Directions
REFERENCES