Index Flashcards

1
Q

What is an index?

A

The goal of creating an index on a particular table in a database is to make it faster to search through the table and find the row or rows that we want. Indexes can be created using one or more columns of a database table, providing the basis for both rapid random lookups and efficient access of ordered records.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Advantage of Index

A

Makes reading faster

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Disadvantage of Index

A

The downside is that indexes make it slower to add rows or make updates to existing rows for that table since we not only have to write the data but also have to update the index. So adding indexes can increase the read performance, but at the same time, decrease the write performance. This performance degradation applies to all insert, update, and delete operations for the table.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly