Sourav
Sourav

Reputation: 17530

Behaviour of INDEX in RDBMS

Q1 => Does an INDEX get purged and created on each insert, update, delete?
Q2 => If yes, how to use an index in a table where there will be 60% read, 30% insert, 10% delete?

Upvotes: 0

Views: 54

Answers (2)

Jonathan Leffler
Jonathan Leffler

Reputation: 755006

  1. No! An index is updated on each operation, but it is not rebuilt on each operation (that would have a completely prohibitive cost).

  2. Moot since the answer to Q1 is No.

Upvotes: 1

Markus Winand
Markus Winand

Reputation: 8746

The indexes are "maintained" for each insert/update/delete. That means the affected records of the affected indexes will be inserted/deleted.

http://use-the-index-luke.com/

Upvotes: 2

Related Questions