Indexing, Hashing, and Query
dev.to·17w·
Discuss: DEV

Indexing involves creating a data structure (an index) that stores a small, ordered subset of data from a table, along with pointers to the full data records. When a query is executed, the DBMS can use this index to quickly locate the relevant data without scanning the entire table.

Hashing uses a hash function to directly map data values to their physical storage locations on disk. Instead of traversing an index structure, the hash function calculates the address of the data based on its value.

Create a table

INSERT INTO Students VALUES (101, ‘Arun’, ‘CSBS’, 8.5), (102, ‘Mathan’, ‘ECE’, 8.8), (103, ‘Karthik’, ‘MECH’, 6.9), (104, ‘Hareesh’, ‘CSE’, 9.1), (105, ‘Ravi’, ‘EEE’, 7.2), (106, ‘Srivishal’, ‘CSBS’, 8.8), (107, ‘Vignesh’, ‘IT’, 8.0), (108, ‘Harish’, ’C…

Similar Posts

Loading similar posts...

Keyboard Shortcuts

Navigation
Next / previous item
j/k
Open post
oorEnter
Preview post
v
Post Actions
Love post
a
Like post
l
Dislike post
d
Undo reaction
u
Recommendations
Add interest / feed
Enter
Not interested
x
Go to
Home
gh
Interests
gi
Feeds
gf
Likes
gl
History
gy
Changelog
gc
Settings
gs
Browse
gb
Search
/
General
Show this help
?
Submit feedback
!
Close modal / unfocus
Esc

Press ? anytime to show this help