SQL Indexes - Definition, Examples, and Tips

preview_player
Показать описание

Indexes in SQL databases are a helpful feature to improve the performance of your queries.
There are a few different types of indexes. Some are common across different vendors, and some are exclusive to one vendor.

In this video, you’ll learn what an index is, see some examples of how they are processed, learn the syntax of creating different indexes, and see some SQL examples of creating indexes on tables.
You’ll also learn some tips on when to create indexes, and why you shouldn’t just create an index on every column.

Timestamps:
00:00 Introduction
00:40 What is an index?
02:13 A database index
02:48 B-tree index
05:01 B-tree index example SQL
06:22 Function-based index
08:12 Clustered index
09:00 Bitmap index
10:33 When should you create an index?
Рекомендации по теме
Комментарии
Автор

Love these easy-to-digest videos to cover missing pieces of knowledge or act as refreshers!

Also, the teaching style. Thank you!

szilardfineascovasa
Автор

Thank you very much! I'm a newbie with databases but I need to work with one for a project and this video has the perfect balance between easy to understand and digging into advanced concepts! Wish you the best!

henriquelisboa
Автор

This is really nice, would you ever consider making a more advanced version, for people who know what indexes are but need advice on where to create them, what columns to add, single vs. multi-column

tomservo
Автор

Thanks for the explanation. It was very very helpful. Now I really understand well indexes.

rafaelbragad
Автор

Thanks your video help me very much! Success to you my friend!

Felipe_Matheus_
Автор

Thank you for this video, very helpful and explained so that any one can understand.
I know it's a bit more to ask, but if it's possible to actually see the reduction in the time taken by actually running the queries in some database would be great.

weekendprogrammer
Автор

Thanks for the intro vid. You mentioned you're going to explain when to use clustered vs non-clustered index, but you didn't do it. Could you share your thoughts.

krs-tube
Автор

Thanks for the brief Explanation, Sir.


Can you please clarify my doubt. Sir, I have created an index but the optimizer is not using it? What are Such cases where optimizer doesn't use the index?

siddharthapenchala
Автор

have one question I don't know is it valid or not. Suppose I created one index on the primary key of one table, Will it run automatically, or need to create any job for that?

Rockstar
Автор

Does order matter when choosing which columns in the WHERE clause? Say for example I have a primary key index of (ID, LOCATION). There will be many ID's in the table, but only 5 LOCATION values. In my SELECT statement, should I use "SELECT * FROM EMPLOYEES WHERE ID = :P_ID_PARM AND LOCATION = :P_LOCATION_PARM" or should I use "SELECT * FROM EMPLOYEES WHERE LOCATION = :P_LOCATION_PARM AND ID = :P_ID_PARM"? Does it matter?
Thanks!

datalore
Автор

B-tree seems very complicated. Or is this caused by the example image?

RoysIdea