Alibaba Cloud Certified Associate (ACA) Practice Test

Disable ads (and more) with a membership for a one time $2.99 payment

Question: 1 / 50

What should be avoided when creating indexes in a database?

Indexing short fields

Indexing frequently modified fields

When creating indexes in a database, one of the primary considerations is the impact of indexes on performance, particularly with regard to data modification. Indexes help speed up query performance, particularly for read operations, but they also introduce overhead when it comes to data modification operations like insertions, updates, or deletions. Indexing frequently modified fields should be avoided because each time a record is updated, the index associated with that field must also be updated. This can lead to significant performance degradation, especially in write-heavy applications where modifications occur frequently. Consequently, the overhead involved could outweigh the benefits of having the index, leading to slower overall performance during data writes. In contrast, indexing short fields or fields that are not queried may not have the same detrimental effects, but it's still important to use resources judiciously. Indexes on short fields might be beneficial if they support query performance, and fields that are not queried do not need to be indexed at all, but they won't impact performance negatively in the same way as frequently modified fields do. Thus, the focus on avoiding indexes on frequently modified fields is key for maintaining optimal database performance.

Indexing fields that are not queried

All of the above

Next

Report this question