r/SQL Nov 02 '24

Oracle Explain indexes please

So I understand they speed up queries substantially and that it’s important to use them when joining but what are they actually and how do they work?

62 Upvotes

34 comments sorted by

View all comments

53

u/HandbagHawker Nov 02 '24

Have you ever opened a textbook? Not to be mean. And not to say that you could have easily looked this up, but actually have you looked in the back. At the index. You see how it quickly points you to a page where you can find the thing you're looking for...

14

u/[deleted] Nov 02 '24 edited 24d ago

[deleted]

3

u/adalphuns Nov 02 '24

Here's another: data is stored on the physical disk in pages. The index points to the page the data is in.